29#define SPI_TIMEOUT_MS 100U
31#define SPI_MAX_NUM_DATA 32U
104#define spi_tx(spi, tx_data, tx_len) spi_exchange(spi, tx_data, tx_len, NULL, 0U)
113#define spi_rx(spi, rx_data, rx_len) spi_exchange(spi, NULL, 0U, rx_data, rx_len)
115#ifdef MS_PLATFORM_X86
SpiMode
SPI Mode selection.
Definition: spi.h:42
SpiPort
SPI Port selection.
Definition: spi.h:34
StatusCode spi_exchange(SpiPort spi, uint8_t *tx_data, size_t tx_len, uint8_t *rx_data, size_t rx_len)
Performs a SPI data exchange.
Definition: spi.c:81
StatusCode spi_init(SpiPort spi, const SpiSettings *settings)
Initialize SPI instance.
Definition: spi.c:77
@ SPI_MODE_0
Definition: spi.h:43
@ SPI_MODE_2
Definition: spi.h:45
@ NUM_SPI_MODES
Definition: spi.h:47
@ SPI_MODE_1
Definition: spi.h:44
@ SPI_MODE_3
Definition: spi.h:46
@ SPI_PORT_3
Definition: spi.h:37
@ SPI_PORT_1
Definition: spi.h:35
@ SPI_PORT_2
Definition: spi.h:36
@ NUM_SPI_PORTS
Definition: spi.h:38
StatusCode
StatusCodes for various errors.
Definition: status.h:27
Port and pin data.
Definition: gpio.h:112
SPI settings struct.
Definition: spi.h:58