34.4.2.9 spi_m_sync_transfer
Perform the SPI data transfer (TX and RX) in polling way.
int32_t spi_m_sync_transfer(
struct spi_m_sync_descriptor * spi,
const struct spi_xfer * xfer
)
Activate CS, do TX and RX and deactivate CS. It blocks.
Parameters
- spi
-
Type: struct spi_m_sync_descriptor Struct *
Pointer to the HAL SPI instance.
- xfer
-
Type: const struct spi_xfer *
Pointer to the transfer information (spi_xfer).
Returns
Type: int32_t
- size
-
Success.
- >=0
-
Timeout, with number of characters transferred.
- ERR_BUSY
-
SPI is busy