/* Enables or disables the selected DAC channel wave generation.  */
void DAC_WaveGenerationEnable(uint32_t DAC_Channel, uint32_t DAC_Wave, FunctionalState Cmd)
/* Enables or disables the selected DAC channel wave generation.  */
void DAC_WaveGenerationEnable(uint32_t DAC_Channel, uint32_t DAC_Wave, FunctionalState Cmd)
{
      __IO uint32_t tmp = 0;
    assert_param(IS_DAC_CHANNEL(DAC_Channel));
    assert_param(IS_DAC_WAVE(DAC_Wave));
    assert_param(IS_FUNCTIONAL_STATE(Cmd));
    tmp=DAC->CTRL;
    tmp&=~(3<<(DAC_Channel+6));
    if (Cmd != DISABLE)
    {
        tmp |= DAC_Wave << DAC_Channel;
    }
    else
    {
        tmp &=~(3<<(DAC_Channel+6));
    }
    DAC->CTRL = tmp;
}