/* param base FlexIO I2S base pointer param bitWidth How many bits in a audio word, usually /32 bits. param rxData Pointer to the data to be read. param size Bytes to be read.  */
void FLEXIO_I2S_ReadBlocking(FLEXIO_I2S_Type *base, uint8_t bitWidth, uint8_t *rxData, size_t size)
/* param base FlexIO I2S base pointer param bitWidth How many bits in a audio word, usually /32 bits. param rxData Pointer to the data to be read. param size Bytes to be read.  */
void FLEXIO_I2S_ReadBlocking(FLEXIO_I2S_Type *base, uint8_t bitWidth, uint8_t *rxData, size_t size)
{
    uint32_t i           = 0;
    uint8_t bytesPerWord = bitWidth / 8U;
    for (i = 0; i < size / bytesPerWord; i++)
    {
        while (!(FLEXIO_GetShifterStatusFlags(base->flexioBase) & (1U << base->rxShifterIndex)))
        {
        }
        FLEXIO_I2S_ReadNonBlocking(base, bitWidth, rxData, bytesPerWord);
        rxData += bytesPerWord;
    }
}