spi_m_os_set_baudrate

Set SPI baudrate.

int32_t spi_m_os_set_baudrate(
    struct spi_m_os_descriptor *const 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_os_descriptor Struct *const

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.