/* DMA Channel Set Request Selection. 
Set DMA request mapping selection for given channel. Refer to datasheet for channel request mapping tables. */
void dma_set_channel_request(uint32_t dma, uint8_t channel, uint8_t request)
/* DMA Channel Set Request Selection. 
Set DMA request mapping selection for given channel. Refer to datasheet for channel request mapping tables. */
void dma_set_channel_request(uint32_t dma, uint8_t channel, uint8_t request)
{
	uint32_t reg32 = DMA_CSELR(dma) & ~(DMA_CSELR_CxS_MASK << DMA_CSELR_CxS_SHIFT(channel));
	DMA_CSELR(dma) = reg32 | ((DMA_CSELR_CxS_MASK & request) << DMA_CSELR_CxS_SHIFT(channel));
}