34.1.5.5 spi_m_async_set_baudrate
Set SPI baudrate.
int32_t spi_m_async_set_baudrate(
struct spi_m_async_descriptor * spi,
const uint32_t baud_val
)
Works if the SPI is initialized as master. In the function a sanity check is used to confirm it's called in the correct mode.
Parameters
- spi
-
Type: struct spi_m_async_descriptor Struct *
Pointer to the HAL SPI instance.
- baud_val
-
Type: const uint32_t
The target baudrate value (see "baudrate calculation" for calculating the value).
Returns
Type: int32_t
Operation status.
- ERR_NONE
-
Success.
- ERR_BUSY
-
Busy.