/* Returns the current memory target used by double buffer transfer.  */
uint32_t DMA_GetCurrentMemoryTarget(DMA_Stream_TypeDef *DMAy_Streamx)
/* Returns the current memory target used by double buffer transfer.  */
uint32_t DMA_GetCurrentMemoryTarget(DMA_Stream_TypeDef *DMAy_Streamx)
{
  uint32_t tmp = 0;
  assert_param(IS_DMA_ALL_PERIPH(DMAy_Streamx));
  if ((DMAy_Streamx->CR & DMA_SxCR_CT) != 0)
  {
    tmp = 1;
  }  
  else
  {
    tmp = 0;    
  }
  return tmp;
}