Go to the documentation of this file.
34 #ifndef SRC_DEMUX_SPI_H_
35 #define SRC_DEMUX_SPI_H_
47 #define CS_OFFSET 0x80
72 uint16_t bytes_number);
int32_t demux_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by demux_spi_init().
Definition: demux_spi.c:103
int32_t no_os_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: no_os_spi.c:159
Header file of SPI Interface.
int32_t demux_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by demux_spi_init().
Definition: demux_spi.c:103
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
int32_t demux_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI demux layer.
Definition: demux_spi.c:63
Header file of SPI Demux Interface.
#define CS_OFFSET
Definition: demux_spi.h:47
uint8_t chip_select
Definition: no_os_spi.h:146
uint8_t chip_select
Definition: no_os_spi.h:200
const struct no_os_spi_platform_ops demux_spi_platform_ops
Demux specific SPI platform ops structure.
Definition: demux_spi.c:51
Structure holding SPI descriptor.
Definition: no_os_spi.h:192
void * extra
Definition: no_os_spi.h:212
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
int32_t demux_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI demux layer.
Definition: demux_spi.c:63
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 no_os_spi_remove(struct no_os_spi_desc *desc)
Free the resources allocated by no_os_spi_init().
Definition: no_os_spi.c:116
uint32_t max_speed_hz
Definition: no_os_spi.h:198
int32_t no_os_spi_init(struct no_os_spi_desc **desc, const struct no_os_spi_init_param *param)
Initialize the SPI communication peripheral.
Definition: no_os_spi.c:52
int32_t demux_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI demux layer.
Definition: demux_spi.c:123
void * extra
Definition: no_os_spi.h:158
enum no_os_spi_mode mode
Definition: no_os_spi.h:202
int32_t demux_spi_write_and_read(struct no_os_spi_desc *desc, uint8_t *data, uint16_t bytes_number)
Write and read data to/from SPI demux layer.
Definition: demux_spi.c:123
const struct no_os_spi_platform_ops demux_spi_platform_ops
Demux specific SPI platform ops structure.
Definition: demux_spi.c:51
Structure holding the parameters for SPI initialization.
Definition: no_os_spi.h:140