/* DMA Stream Set the Peripheral Address. 
Set the address of the peripheral register to or from which data is to be transferred. Refer to the documentation for the specific peripheral. */
void dma_set_peripheral_address(uint32_t dma, uint8_t stream, uint32_t address)
/* DMA Stream Set the Peripheral Address. 
Set the address of the peripheral register to or from which data is to be transferred. Refer to the documentation for the specific peripheral. */
void dma_set_peripheral_address(uint32_t dma, uint8_t stream, uint32_t address)
{
	if (!(DMA_SCR(dma, stream) & DMA_SxCR_EN)) {
		DMA_SPAR(dma, stream) = (uint32_t *) address;
	}
}