/* Enables or disables the double buffer mode for the selected DMA stream.  */
void DMA_DoubleBufferModeCmd(DMA_Stream_TypeDef *DMAy_Streamx, FunctionalState NewState)
/* Enables or disables the double buffer mode for the selected DMA stream.  */
void DMA_DoubleBufferModeCmd(DMA_Stream_TypeDef *DMAy_Streamx, FunctionalState NewState)
{
  assert_param(IS_DMA_ALL_PERIPH(DMAy_Streamx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  if (NewState != DISABLE)
  {
    DMAy_Streamx->CR |= (uint32_t)DMA_SxCR_DBM;
  }
  else
  {
    DMAy_Streamx->CR &= ~(uint32_t)DMA_SxCR_DBM;
  }
}