/* param base FlexIO I2S base pointer. param bitWidth How many bits in a audio word, usually /32 bits. param txData Pointer to the data to be written. param size Bytes to be written.  */
void FLEXIO_I2S_WriteBlocking(FLEXIO_I2S_Type *base, uint8_t bitWidth, uint8_t *txData, size_t size)
/* param base FlexIO I2S base pointer. param bitWidth How many bits in a audio word, usually /32 bits. param txData Pointer to the data to be written. param size Bytes to be written.  */
void FLEXIO_I2S_WriteBlocking(FLEXIO_I2S_Type *base, uint8_t bitWidth, uint8_t *txData, size_t size)
{
    uint32_t i = 0;
    uint8_t bytesPerWord = bitWidth / 8U;
    for (i = 0; i < size / bytesPerWord; i++)
    {
        while ((FLEXIO_I2S_GetStatusFlags(base) & kFLEXIO_I2S_TxDataRegEmptyFlag) == 0)
        {
        }
        FLEXIO_I2S_WriteNonBlocking(base, bitWidth, txData, bytesPerWord);
        txData += bytesPerWord;
    }
    while ((FLEXIO_I2S_GetStatusFlags(base) & kFLEXIO_I2S_TxDataRegEmptyFlag) == 0)
    {
    }
}