/* Enables or disables the analog watchdog on single/all regular or injected channels.  */
void ADC_AnalogWatchdogCmd(ADC_TypeDef *ADCx, FunctionalState NewState)
/* Enables or disables the analog watchdog on single/all regular or injected channels.  */
void ADC_AnalogWatchdogCmd(ADC_TypeDef *ADCx, FunctionalState NewState)
{
    assert_param(IS_ADC_ALL_PERIPH(ADCx));
    assert_param(IS_FUNCTIONAL_STATE(NewState));
    if (NewState != DISABLE)
    {
        ADCx->ADCFG |= ADCFG_AWDMode_Set;
    }
    else
    {
        ADCx->ADCFG &= ADCFG_AWDMode_Reset;
    }
}