|
oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
|
SPI bus master driver. More...
Data Structures | |
| struct | ove_spi_cfg |
| SPI bus configuration descriptor. More... | |
| struct | ove_spi_cs |
| SPI chip-select descriptor. More... | |
| struct | ove_spi_xfer |
| SPI transfer segment for multi-segment transactions. More... | |
Enumerations | |
| enum | ove_spi_mode_t { OVE_SPI_MODE_0 = 0 , OVE_SPI_MODE_1 = 1 , OVE_SPI_MODE_2 = 2 , OVE_SPI_MODE_3 = 3 } |
| SPI clock polarity / phase mode. More... | |
| enum | ove_spi_bit_order_t { OVE_SPI_MSB_FIRST = 0 , OVE_SPI_LSB_FIRST = 1 } |
| SPI bit order. More... | |
Functions | |
| static int | ove_spi_create (ove_spi_t *s, const struct ove_spi_cfg *c) |
| static void | ove_spi_destroy (ove_spi_t s) |
| static int | ove_spi_transfer (ove_spi_t s, const struct ove_spi_cs *cs, const void *tx, void *rx, size_t l, uint32_t t) |
| static int | ove_spi_write (ove_spi_t s, const struct ove_spi_cs *cs, const void *d, size_t l, uint32_t t) |
| static int | ove_spi_read (ove_spi_t s, const struct ove_spi_cs *cs, void *b, size_t l, uint32_t t) |
| static int | ove_spi_transfer_seq (ove_spi_t s, const struct ove_spi_cs *cs, const struct ove_spi_xfer *x, unsigned int n, uint32_t t) |
SPI bus master driver.
Provides a portable SPI master API with configurable clock, mode, thread-safe bus locking, and software chip-select management via GPIO.
Two allocation strategies are supported:
_create() / _destroy() — unified API (heap or zero-heap macro)._init() / _deinit() — explicit static storage.CONFIG_OVE_SPI. | enum ove_spi_mode_t |
| enum ove_spi_bit_order_t |