void ADCC0_IrqHandler(void) { status = ADC12_GetStatus(AT91C_BASE_ADC); for(i=0;i<7;i++) { if ((enchan&(1<<chns[i]) )&&ADC12_IsChannelInterruptStatusSet(status, chns[i])) { advalue[i] = ConvHex2mV(ADC12_GetConvertedData(AT91C_BASE_ADC, chns[i])); conversionDone |= 1<<chns[i]; } } if(autosample) adc_sample(); }
//----------------------------------------------------------------------------- /// Test if ADC Status is Set /// \param pAdc Pointer to an AT91S_ADC instance. /// \param flag flag to be tested /// \return 1 if the staus is set; 0 otherwise //----------------------------------------------------------------------------- unsigned int ADC12_IsStatusSet(AT91S_ADC12B *pAdc, unsigned int flag) { return (ADC12_GetStatus(pAdc) & flag); }