Set SPI mode.
int32_t spi_s_async_set_mode( struct spi_s_async_descriptor * spi, const enum spi_transfer_mode mode )
Mode 0: leading edge is rising edge, data sample on leading edge.
Mode 1: leading edge is rising edge, data sample on trailing edge.
Mode 2: leading edge is falling edge, data sample on leading edge.
Mode 3: leading edge is falling edge, data sample on trailing edge. Note that SPI must be disabled to change mode.
Type: struct spi_s_async_descriptor Struct *
Pointer to the HAL SPI instance.
Type: const enum spi_transfer_mode
The mode (spi_transfer_mode_t).
Type: int32_t
Operation status.
Success.
Not Ready
Busy, CS activated.