34.3.2.9 spi_m_os_transfer
Perform the SPI data transfer (TX and RX) using RTOS.
int32_t spi_m_os_transfer(
struct spi_m_os_descriptor *const spi,
uint8_t const * txbuf,
uint8_t *const rxbuf,
const uint16_t length
)
Log the TX and RX buffers and transfer them in background. It blocks task/thread until the transfer done.
Parameters
- spi
-
Type: struct spi_m_os_descriptor Struct *const
Pointer to the HAL SPI instance.
- txbuf
-
Type: uint8_t const *
Pointer to the transfer information (spi_transfer).
- rxbuf
-
Type: uint8_t *const
Pointer to the receiver information (spi_receive).
- length
-
Type: const uint16_t
SPI transfer data length.
Returns
Type: int32_t
Operation status.
- ERR_NONE
-
Success.
- ERR_BUSY
-
Busy.