/* param handle DMA handle pointer. The DMA handle stores callback function and parameters. param base DMA peripheral base address. param channel DMA channel number.  */
void DMA_CreateHandle(dma_handle_t *handle, DMA_Type *base, uint32_t channel)
/* param handle DMA handle pointer. The DMA handle stores callback function and parameters. param base DMA peripheral base address. param channel DMA channel number.  */
void DMA_CreateHandle(dma_handle_t *handle, DMA_Type *base, uint32_t channel)
{
    assert(FSL_FEATURE_DMA_NUMBER_OF_CHANNELSn(base) != -1);
    assert((NULL != handle) && (channel < (uint32_t)FSL_FEATURE_DMA_NUMBER_OF_CHANNELSn(base)));
    uint32_t dmaInstance;
    uint32_t startChannel = 0;
    dmaInstance  = DMA_GetInstance(base);
    startChannel = DMA_GetVirtualStartChannel(base);
    (void)memset(handle, 0, sizeof(*handle));
    handle->base                        = base;
    handle->channel                     = (uint8_t)channel;
    s_DMAHandle[startChannel + channel] = handle;
    (void)EnableIRQ(s_dmaIRQNumber[dmaInstance]);
    DMA_EnableChannelInterrupts(handle->base, channel);
}