/* param base SAI base pointer param handle SAI eDMA handle pointer.  */
void SAI_TransferAbortReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle)
/* param base SAI base pointer param handle SAI eDMA handle pointer.  */
void SAI_TransferAbortReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle)
{
    assert(handle);
    EDMA_AbortTransfer(handle->dmaHandle);
    base->RCR3 &= ~I2S_RCR3_RCE_MASK;
    SAI_RxEnableDMA(base, kSAI_FIFORequestDMAEnable, false);
    SAI_RxEnable(base, false);
    base->RCSR |= (I2S_RCSR_FR_MASK | I2S_RCSR_SR_MASK);
    base->RCSR &= ~I2S_RCSR_SR_MASK;
    memset(&handle->saiQueue[handle->queueDriver], 0, sizeof(sai_transfer_t));
    handle->queueDriver = (handle->queueDriver + 1) % SAI_XFER_QUEUE_SIZE;
    handle->state = kSAI_Idle;
}