/* Checks whether the specified adc's interrupt has occurred or not.  */
ITStatus ADC_GetITStatus(ADC_TypeDef *adc, ADCFLAG_TypeDef adc_interrupt)
/* Checks whether the specified adc's interrupt has occurred or not.  */
ITStatus ADC_GetITStatus(ADC_TypeDef *adc, ADCFLAG_TypeDef adc_interrupt)
{
    return (adc_interrupt == ADC_IT_EOC) ? ((adc->ADSTA & ADC_SR_ADIF) ? SET : RESET) : ((adc->ADSTA & ADC_SR_ADWIF) ? SET : RESET);
}