/* 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 != NULL);
    SPDIF_DisableInterrupts(base, (uint32_t)kSPDIF_UChannelReceiveRegisterFull |
                                      (uint32_t)kSPDIF_QChannelReceiveRegisterFull | (uint32_t)kSPDIF_RxFIFOFull |
                                      (uint32_t)kSPDIF_RxControlChannelChange);
    handle->state = kSPDIF_Idle;
    (void)memset(handle->spdifQueue, 0, sizeof(spdif_transfer_t) * SPDIF_XFER_QUEUE_SIZE);
    handle->queueDriver = 0;
    handle->queueUser   = 0;
}