/* Enables or disables the analog watchdog on single/all regular or injected channels.  */
void ADC_AnalogWatchdogCmd(ADC_TypeDef *ADCx, uint32_t ADC_AnalogWatchdog)
/* Enables or disables the analog watchdog on single/all regular or injected channels.  */
void ADC_AnalogWatchdogCmd(ADC_TypeDef *ADCx, uint32_t ADC_AnalogWatchdog)
{
    uint32_t tmpreg = 0;
    assert_param(IS_ADC_ALL_PERIPH(ADCx));
    assert_param(IS_ADC_ANALOG_WATCHDOG(ADC_AnalogWatchdog));
    tmpreg = ADCx->ADCFG;
    tmpreg &= ADCFG_AWDMode_Reset;
    tmpreg |= ADC_AnalogWatchdog;
    ADCx->ADCFG = tmpreg;
}