/* param base SAI base pointer. param handle SAI eDMA handle pointer.  */
void SAI_TransferAbortSendEDMA(I2S_Type *base, sai_edma_handle_t *handle)
/* param base SAI base pointer. param handle SAI eDMA handle pointer.  */
void SAI_TransferAbortSendEDMA(I2S_Type *base, sai_edma_handle_t *handle)
{
    assert(handle != NULL);
    EDMA_AbortTransfer(handle->dmaHandle);
    base->TCR3 &= ~I2S_TCR3_TCE_MASK;
    SAI_TxEnableDMA(base, kSAI_FIFORequestDMAEnable, false);
    SAI_TxEnable(base, false);
    if ((base->TCSR & I2S_TCSR_TE_MASK) == 0UL)
    {
        base->TCSR |= (I2S_TCSR_FR_MASK | I2S_TCSR_SR_MASK);
        base->TCSR &= ~I2S_TCSR_SR_MASK;
    }
    (void)memset(&handle->saiQueue[handle->queueDriver], 0, sizeof(sai_transfer_t));
    handle->queueDriver = (handle->queueDriver + 1U) % (uint8_t)SAI_XFER_QUEUE_SIZE;
    handle->state = (uint32_t)kSAI_Idle;
}