/* param base SPDIF base pointer param handle SPDIF handle pointer. param callback Pointer to the user callback function. param userData User parameter passed to the callback function  */
void SPDIF_TransferTxCreateHandle(SPDIF_Type *base, spdif_handle_t *handle, spdif_transfer_callback_t callback, void *userData)
/* param base SPDIF base pointer param handle SPDIF handle pointer. param callback Pointer to the user callback function. param userData User parameter passed to the callback function  */
void SPDIF_TransferTxCreateHandle(SPDIF_Type *base, spdif_handle_t *handle, spdif_transfer_callback_t callback, void *userData)
{
    assert(handle);
    memset(handle, 0, sizeof(*handle));
    s_spdifHandle[SPDIF_GetInstance(base)][0] = handle;
    handle->callback = callback;
    handle->userData = userData;
    handle->watermark =
        s_spdif_tx_watermark[(base->SCR & SPDIF_SCR_TXFIFOEMPTY_SEL_MASK) >> SPDIF_SCR_TXFIFOEMPTY_SEL_SHIFT];
    s_spdifTxIsr = SPDIF_TransferTxHandleIRQ;
    EnableIRQ(s_spdifIRQ[SPDIF_GetInstance(base)]);
}