/* Checks whether the specified ADC flag is set or not.  */
FlagStatus ADC_GetCommonFlagStatus(ADC_TypeDef *ADCx, uint32_t ADC_FLAG)
/* Checks whether the specified ADC flag is set or not.  */
FlagStatus ADC_GetCommonFlagStatus(ADC_TypeDef *ADCx, uint32_t ADC_FLAG)
{
  uint32_t tmpreg1 = 0;
  FlagStatus bitstatus = RESET;
  assert_param(IS_ADC_ALL_PERIPH(ADCx));
  assert_param(IS_ADC_GET_COMMONFLAG(ADC_FLAG));
  if((ADCx == ADC1) || (ADCx == ADC2))
  {
    tmpreg1 = ADC1_2->CSR;
  }
  else
  {
    tmpreg1 = ADC3_4->CSR;
  }
  if ((tmpreg1 & ADC_FLAG) != (uint32_t)RESET)
  {
    bitstatus = SET;
  }
  else
  {
    bitstatus = RESET;
  }
  return  bitstatus;
}