/* param base SPDIF base pointer param handle Pointer to the spdif_handle_t structure which stores the transfer state.  */
void SPDIF_TransferAbortReceive(SPDIF_Type *base, spdif_handle_t *handle)
/* param base SPDIF base pointer param handle Pointer to the spdif_handle_t structure which stores the transfer state.  */
void SPDIF_TransferAbortReceive(SPDIF_Type *base, spdif_handle_t *handle)
{
    assert(handle);
    SPDIF_DisableInterrupts(base, kSPDIF_UChannelReceiveRegisterFull | kSPDIF_QChannelReceiveRegisterFull |
                                      kSPDIF_RxFIFOFull | kSPDIF_RxControlChannelChange);
    handle->state = kSPDIF_Idle;
    memset(handle->spdifQueue, 0, sizeof(spdif_transfer_t) * SPDIF_XFER_QUEUE_SIZE);
    handle->queueDriver = 0;
    handle->queueUser = 0;
}