/* DMA Stream Set Priority. 
Ensure that the stream is disabled otherwise the setting will not be changed. */
void dma_set_priority(uint32_t dma, uint8_t stream, uint32_t prio)
/* DMA Stream Set Priority. 
Ensure that the stream is disabled otherwise the setting will not be changed. */
void dma_set_priority(uint32_t dma, uint8_t stream, uint32_t prio)
{
	DMA_SCR(dma, stream) &= ~(DMA_SxCR_PL_MASK);
	DMA_SCR(dma, stream) |= prio;
}