// ***************************************************************************** // ***************************************************************************** // Section: System Interrupt Vector Functions // ***************************************************************************** // ***************************************************************************** void __ISR(_ADC_VECTOR, ipl3AUTO) _IntHandlerDrvAdc(void) { /* The ADC uses persistent interrupts. Persistent interrupts prevent you from clearing the interrupt flag until the issue causing the interrupt is cleared. Read the ADC results before clearing the interrupt flag. */ APP_ADC_Average(); /* Clear ADC Interrupt Flag */ PLIB_INT_SourceFlagClear(INT_ID_0, INT_SOURCE_ADC_1); }