34.1.5.9 spi_m_async_transfer
Perform the SPI data transfer (TX and RX) asynchronously.
int32_t spi_m_async_transfer(
struct spi_m_async_descriptor * spi,
uint8_t const * txbuf,
uint8_t *const rxbuf,
const uint16_t length
)
Log the TX and RX buffers and transfer them in the background. It never blocks.
Parameters
- spi
-
Type: struct spi_m_async_descriptor Struct *
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.