/* brief Creates the SDIF handle. register call back function for interrupt and enable the interrupt param base SDIF peripheral base address. param handle SDIF handle pointer. param callback Structure pointer to contain all callback functions. param userData Callback function parameter.  */
void SDIF_TransferCreateHandle(SDIF_Type *base, sdif_handle_t *handle, sdif_transfer_callback_t *callback, void *userData)
/* brief Creates the SDIF handle. register call back function for interrupt and enable the interrupt param base SDIF peripheral base address. param handle SDIF handle pointer. param callback Structure pointer to contain all callback functions. param userData Callback function parameter.  */
void SDIF_TransferCreateHandle(SDIF_Type *base, sdif_handle_t *handle, sdif_transfer_callback_t *callback, void *userData)
{
    assert(handle != NULL);
    assert(callback != NULL);
    (void)memset(handle, 0, sizeof(*handle));
    handle->callback.SDIOInterrupt     = callback->SDIOInterrupt;
    handle->callback.DMADesUnavailable = callback->DMADesUnavailable;
    handle->callback.CommandReload     = callback->CommandReload;
    handle->callback.TransferComplete  = callback->TransferComplete;
    handle->callback.cardInserted      = callback->cardInserted;
    handle->callback.cardRemoved       = callback->cardRemoved;
    handle->userData                   = userData;
    s_sdifHandle[SDIF_GetInstance(base)] = handle;
    s_sdifIsr = SDIF_TransferHandleIRQ;
    SDIF_EnableGlobalInterrupt(base, true);
    (void)EnableIRQ(s_sdifIRQ[SDIF_GetInstance(base)]);
}