Enumerated types for SPI driver. More...
Enumerations | |
| enum | spi_status_en { SPI_OK = 0 , SPI_ERROR , SPI_ERROR_PARAMETER , SPI_ERROR_BUSY , SPI_ERROR_TIMEOUT , SPI_ERROR_UNSUPPORTED , SPI_ERROR_BAUDRATE , SPI_ERROR_NOT_INITIALIZED , SPI_ERROR_TX_OVERFLOW } |
| SPI driver status and error codes. More... | |
| enum | spi_transfer_status_en { SPI_TRANSFER_IN_PROGRESS = 0x01 , SPI_TRANSFER_TIMEOUT = 0x02 , SPI_TRANSFER_ERROR = 0x03 , SPI_TRANSFER_DONE = 0x04 , SPI_FIFO_DRAINED = 0x05 , SPI_ALL_DATA_IN_FIFO = 0x06 } |
| SPI transfer status. More... | |
| enum | spi_sclk_mode_en { SPI_CPHA0_CPOL0 = 0U , SPI_CPHA1_CPOL0 = 1U , SPI_CPHA0_CPOL1 = 2U , SPI_CPHA1_CPOL1 = 3U } |
| SPI clock mode. More... | |
| enum | spi_xfer_mode_en { SPI_TRANSMIT_AND_RECEIVE = 0u , SPI_TRANSMIT_ONLY = 1u , SPI_RECEIVE_ONLY = 2u , SPI_EEPROM_READ = 3u } |
| SPI transfer mode. More... | |
Enumerated types for SPI driver.
| enum spi_status_en |
SPI driver status and error codes.
This enumeration defines various return and error codes used by the SPI driver to indicate operation success, failure, and specific error conditions.
SPI transfer status.
This enumeration defines various transfer status used by the SPI driver.
| enum spi_sclk_mode_en |
SPI clock mode.
This enumeration defines the SPI clock polarity and phase.
| enum spi_xfer_mode_en |
SPI transfer mode.
This enumeration selects the direction and type of SPI data transfer.
| Enumerator | |
|---|---|
| SPI_TRANSMIT_AND_RECEIVE | Both transmit and receive are enabled |
| SPI_TRANSMIT_ONLY | Only transmit is enabled, receive data is dropped |
| SPI_RECEIVE_ONLY | Only receive is enabled, first word written to TX FIFO is repeated, Total data received is specified in spi_config_t |
| SPI_EEPROM_READ | First send all control data (address, opcode), While sending control data receive data is ignored Once TX FIFO is empty receive data is stored in RX FIFO; amount received is specified in spi_config_t |