/* param base Pointer to the FLEXIO_SPI_Type structure. param baudRate_Bps Baud Rate needed in Hz. param srcClockHz SPI source clock frequency in Hz.  */
void FLEXIO_SPI_MasterSetBaudRate(FLEXIO_SPI_Type *base, uint32_t baudRate_Bps, uint32_t srcClockHz)
/* param base Pointer to the FLEXIO_SPI_Type structure. param baudRate_Bps Baud Rate needed in Hz. param srcClockHz SPI source clock frequency in Hz.  */
void FLEXIO_SPI_MasterSetBaudRate(FLEXIO_SPI_Type *base, uint32_t baudRate_Bps, uint32_t srcClockHz)
{
    uint16_t timerDiv       = 0;
    uint16_t timerCmp       = 0;
    FLEXIO_Type *flexioBase = base->flexioBase;
    timerDiv = srcClockHz / baudRate_Bps;
    timerDiv = timerDiv / 2 - 1U;
    timerCmp = flexioBase->TIMCMP[base->timerIndex[0]];
    timerCmp &= 0xFF00U;
    timerCmp |= timerDiv;
    flexioBase->TIMCMP[base->timerIndex[0]] = timerCmp;
}