/* Transmit an amount of data in non-blocking mode with Interrupt.  */
static void I2S_Transmit_IT(I2S_HandleTypeDef *hi2s)
/* Transmit an amount of data in non-blocking mode with Interrupt.  */
static void I2S_Transmit_IT(I2S_HandleTypeDef *hi2s)
{
	uint32_t fifo_count = I2S_FIFO_FULL - __HAL_I2S_GET_TXFIFO(hi2s);
	if (fifo_count > hi2s->TxXferCount)
	{
		fifo_count = hi2s->TxXferCount;
	}
	while (fifo_count > 0)
	{
		hi2s->Instance->TXDR = *(hi2s->pTxBuffPtr);
		hi2s->pTxBuffPtr++;
		hi2s->TxXferCount--;
		fifo_count--;
	}
}