/* configure the direction of data transfer on the channel  */
void dma_transfer_direction_config(dma_channel_enum channelx, uint8_t direction)
/* configure the direction of data transfer on the channel  */
void dma_transfer_direction_config(dma_channel_enum channelx, uint8_t direction)
{
    if(DMA_PERIPHERA_TO_MEMORY == direction){
        DMA_CHCTL(channelx) &= ~DMA_CHXCTL_TM;
    } else {
        DMA_CHCTL(channelx) |= DMA_CHXCTL_TM;
    }
}