4.4.6 ADC Result Ready Interrupt Routine

The ADC Result Ready interrupt routine will be called when the ADC conversion is complete, and the configured number of samples have been accumulated. Once a conversion is complete, the result will be read and stored in adc_result.

ISR(ADC0_RESRDY_vect)
{
	adc_result = ADC0.RESULT;			/* Read ADC result register */
	ADC0.INTFLAGS = ADC_RESRDY_bm;		/* Clear ADC result ready interrupt flag */
}