+void timer2_isr(void) __interrupt TF2_ISR
+{
+ /* Blink LED during acquisition, keep it on otherwise. */
+ if (gpif_acquiring) {
+ if (--ledcounter == 0) {
+ PA1 = !PA1;
+ ledcounter = 1000;
+ }
+ } else {
+ PA1 = 1; /* LED on. */
+ }
+ TF2 = 0;
+}
+