/* Configure DMA channel according to the specified parameter in the dma_handle_t structure. The DMA mode is basic. This mode is used to carry data from peripheral to memory or from memory to peripheral.  */
void ald_dma_config_basic(ald_dma_handle_t *hperh)
/* Configure DMA channel according to the specified parameter in the dma_handle_t structure. The DMA mode is basic. This mode is used to carry data from peripheral to memory or from memory to peripheral.  */
void ald_dma_config_basic(ald_dma_handle_t *hperh)
{
    dma_cbk[hperh->config.channel].cplt_tc_cbk = hperh->cplt_tc_cbk;
    dma_cbk[hperh->config.channel].cplt_ht_cbk  = hperh->cplt_ht_cbk;
    dma_cbk[hperh->config.channel].cplt_tc_arg = hperh->cplt_tc_arg;
    dma_cbk[hperh->config.channel].cplt_ht_arg  = hperh->cplt_ht_arg;
    ald_dma_clear_flag_status(hperh->config.channel, ALD_DMA_IT_FLAG_TC);
    ald_dma_clear_flag_status(hperh->config.channel, ALD_DMA_IT_FLAG_HT);
    ald_dma_config_base(&hperh->config);
    ald_dma_channel_config(hperh->config.channel, ENABLE);
    return;
}