/* Checks whether the specified ADC flag is set or not.  */
FlagStatus ADC_GetFlagStatus(ADC_TypeDef *adc, ADCFLAG_TypeDef adc_flag)
/* Checks whether the specified ADC flag is set or not.  */
FlagStatus ADC_GetFlagStatus(ADC_TypeDef *adc, ADCFLAG_TypeDef adc_flag)
{
    return (adc_flag == ADC_IT_EOC) ? ((adc->ADSTA & ADC_SR_ADIF) ? SET : RESET) : ((adc->ADSTA & ADC_SR_ADWIF) ? SET : RESET);
}