/* DMA Stream Set the Base Memory Address 1. 
Set the address pointer to the memory location for DMA transfers. The DMA stream must normally be disabled before setting this address, however it is possible to change this in double buffer mode when the current target is memory area 0 (see  */
void dma_set_memory_address_1(uint32_t dma, uint8_t stream, uint32_t address)
/* DMA Stream Set the Base Memory Address 1. 
Set the address pointer to the memory location for DMA transfers. The DMA stream must normally be disabled before setting this address, however it is possible to change this in double buffer mode when the current target is memory area 0 (see  */
void dma_set_memory_address_1(uint32_t dma, uint8_t stream, uint32_t address)
{
	uint32_t reg32 = DMA_SCR(dma, stream);
	if (!(reg32 & DMA_SxCR_EN) ||
	     (!(reg32 & DMA_SxCR_CT) && (reg32 & DMA_SxCR_DBM))) {
		DMA_SM1AR(dma, stream) = (uint32_t *) address;
	}
}