/* DMA Channel Reset. 
The channel is disabled and configuration registers are cleared. */
void dma_channel_reset(uint32_t dma, uint8_t channel)
/* DMA Channel Reset. 
The channel is disabled and configuration registers are cleared. */
void dma_channel_reset(uint32_t dma, uint8_t channel)
{
	DMA_CCR(dma, channel) = 0;
	DMA_CNDTR(dma, channel) = 0;
	DMA_CPAR(dma, channel) = 0;
	DMA_CMAR(dma, channel) = 0;
	DMA_IFCR(dma) |= DMA_IFCR_CIF(channel);
}