/* param base DMA base address. param channel DMA channel. param descriptor configured DMA descriptor.  */
void DMA_LoadChannelDescriptor(DMA_Type *base, uint32_t channel, dma_descriptor_t *descriptor)
/* param base DMA base address. param channel DMA channel. param descriptor configured DMA descriptor.  */
void DMA_LoadChannelDescriptor(DMA_Type *base, uint32_t channel, dma_descriptor_t *descriptor)
{
    assert(NULL != descriptor);
    assert(FSL_FEATURE_DMA_NUMBER_OF_CHANNELSn(base) != -1);
    assert(channel < (uint32_t)FSL_FEATURE_DMA_NUMBER_OF_CHANNELSn(base));
    uint32_t instance                   = DMA_GetInstance(base);
    dma_descriptor_t *channelDescriptor = (dma_descriptor_t *)(&s_dma_descriptor_table[instance][channel]);
    channelDescriptor->xfercfg        = descriptor->xfercfg;
    channelDescriptor->srcEndAddr     = descriptor->srcEndAddr;
    channelDescriptor->dstEndAddr     = descriptor->dstEndAddr;
    channelDescriptor->linkToNextDesc = descriptor->linkToNextDesc;
    base->CHANNEL[channel].XFERCFG = descriptor->xfercfg;
}