/* Enables or disables the specified ADC Voltage Regulator.  */
void ADC_VoltageRegulatorCmd(ADC_TypeDef *ADCx, FunctionalState NewState)
/* Enables or disables the specified ADC Voltage Regulator.  */
void ADC_VoltageRegulatorCmd(ADC_TypeDef *ADCx, FunctionalState NewState)
{
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  ADCx->CR &= ~(ADC_CR_ADVREGEN);
  if (NewState != DISABLE)
  {
    ADCx->CR |= ADC_CR_ADVREGEN_0;
  }
  else
  {
    ADCx->CR |=ADC_CR_ADVREGEN_1;
  }
}