Header file of SPI Interface.
int spidev_fd
Definition: linux_spi.c:62
Definition: no_os_spi.h:100
enum no_os_spi_mode mode
Definition: no_os_spi.h:148
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
Linux platform specific SPI descriptor.
Definition: linux_spi.c:60
uint32_t device_id
Definition: no_os_spi.h:142
uint8_t chip_select
Definition: no_os_spi.h:146
uint8_t cs_change
Definition: no_os_spi.h:108
int32_t linux_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by linux_spi_init().
Definition: linux_spi.c:171
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
const struct no_os_spi_platform_ops linux_spi_ops
Linux specific SPI platform ops structure.
Definition: linux_spi.c:228
int32_t linux_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI.
Definition: linux_spi.c:143
uint32_t bytes_number
Definition: no_os_spi.h:106
void * extra
Definition: no_os_spi.h:212
uint32_t cs_change_delay
Definition: no_os_spi.h:113
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
uint32_t max_speed_hz
Definition: no_os_spi.h:144
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
int32_t linux_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: linux_spi.c:75
const struct no_os_spi_platform_ops linux_spi_ops
Linux platform specific SPI platform ops structure.
Definition: linux_spi.c:228
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140