/* Configures the Memory address for the next buffer transfer in double buffer mode (for dynamic use).  */
void DMA_ConfigMemoryTarget(DMA_Stream_T *stream, uint32_t memoryBaseAddr, DMA_MEMORY_T memoryTarget)
/* Configures the Memory address for the next buffer transfer in double buffer mode (for dynamic use).  */
void DMA_ConfigMemoryTarget(DMA_Stream_T *stream, uint32_t memoryBaseAddr, DMA_MEMORY_T memoryTarget)
{
    if (memoryTarget != DMA_MEMORY_0)
    {
        stream->M1ADDR = memoryBaseAddr;
    }
    else
    {
        stream->M0ADDR = memoryBaseAddr;
    }
}