/* Initializes the ADCs peripherals according to the specified parameters in the ADC_CommonInitStruct.  */
void ADC_CommonInit(ADC_CommonInitTypeDef *ADC_CommonInitStruct)
/* Initializes the ADCs peripherals according to the specified parameters in the ADC_CommonInitStruct.  */
void ADC_CommonInit(ADC_CommonInitTypeDef *ADC_CommonInitStruct)
{
  uint32_t tmpreg1 = 0;
  assert_param(IS_ADC_MODE(ADC_CommonInitStruct->ADC_Mode));
  assert_param(IS_ADC_PRESCALER(ADC_CommonInitStruct->ADC_Prescaler));
  assert_param(IS_ADC_DMA_ACCESS_MODE(ADC_CommonInitStruct->ADC_DMAAccessMode));
  assert_param(IS_ADC_SAMPLING_DELAY(ADC_CommonInitStruct->ADC_TwoSamplingDelay));
  tmpreg1 = ADC->CCR;
  tmpreg1 &= CR_CLEAR_MASK;    
  tmpreg1 |= (uint32_t)(ADC_CommonInitStruct->ADC_Mode | 
                        ADC_CommonInitStruct->ADC_Prescaler | 
                        ADC_CommonInitStruct->ADC_DMAAccessMode | 
                        ADC_CommonInitStruct->ADC_TwoSamplingDelay);
  ADC->CCR = tmpreg1;
}