/* param base SAI base pointer. param sourceClockHz, bit clock source frequency. param sampleRate audio data sample rate. param bitWidth, audio data bitWidth. param channelNumbers, audio channel numbers.  */
void I2S_SetBitClockRate(I2S_Type *base, uint32_t sourceClockHz, uint32_t sampleRate, uint32_t bitWidth, uint32_t channelNumbers)
/* param base SAI base pointer. param sourceClockHz, bit clock source frequency. param sampleRate audio data sample rate. param bitWidth, audio data bitWidth. param channelNumbers, audio channel numbers.  */
void I2S_SetBitClockRate(I2S_Type *base, uint32_t sourceClockHz, uint32_t sampleRate, uint32_t bitWidth, uint32_t channelNumbers)
{
    uint32_t bitClockDivider = sourceClockHz / sampleRate / bitWidth / channelNumbers;
    assert(bitClockDivider >= 1U);
    base->DIV = I2S_DIV_DIV(bitClockDivider - 1U);
}