altos: Oops. Was only filling out part of the TeleMetrum ADC record
authorKeith Packard <keithp@keithp.com>
Mon, 9 Dec 2013 05:08:36 +0000 (21:08 -0800)
committerKeith Packard <keithp@keithp.com>
Mon, 9 Dec 2013 05:08:36 +0000 (21:08 -0800)
Because it's missing a return, we'd end up filling out one element of
the ADC record per interrupt, and rotating through which one was set,
hitting all of the even offsets within the struct. Yikes!

Signed-off-by: Keith Packard <keithp@keithp.com>
src/cc1111/ao_adc.c

index 154296770c7dec724f824f2d09212d1790d58758..1689ebef3b1b831b3b653bf5349c234e2cf1104d 100644 (file)
@@ -85,6 +85,7 @@ ao_adc_isr(void) __interrupt 1
                else
 #endif
                        ADCCON3 = ADCCON3_EREF_VDD | ADCCON3_EDIV_512 | sequence;
+               return;
        }
 #endif