/* DMA Stream Set Initial Target Memory. 
Ensure that the stream is disabled otherwise the setting will not be changed. */
void dma_set_initial_target(uint32_t dma, uint8_t stream, uint8_t memory)
/* DMA Stream Set Initial Target Memory. 
Ensure that the stream is disabled otherwise the setting will not be changed. */
void dma_set_initial_target(uint32_t dma, uint8_t stream, uint8_t memory)
{
	uint32_t reg32 = (DMA_SCR(dma, stream) & ~DMA_SxCR_CT);
	if (memory == 1) {
		reg32 |= DMA_SxCR_CT;
	}
	DMA_SCR(dma, stream) = reg32;
}