altos: Oops. Was only filling out part of the TeleMetrum ADC record
[fw/altos] / src / cc1111 / ao_adc.c
index 1523f94a278056dcf3e59ab54248c560752529a6..1689ebef3b1b831b3b653bf5349c234e2cf1104d 100644 (file)
@@ -19,6 +19,9 @@
 
 volatile __xdata struct ao_data        ao_data_ring[AO_DATA_RING];
 volatile __data uint8_t                ao_data_head;
+#if (AO_DATA_ALL & ~(AO_DATA_ADC))
+volatile __data uint8_t                ao_data_present;
+#endif
 
 #ifdef TELENANO_V_0_1
 # define AO_ADC_FIRST_PIN      1
@@ -82,6 +85,7 @@ ao_adc_isr(void) __interrupt 1
                else
 #endif
                        ADCCON3 = ADCCON3_EREF_VDD | ADCCON3_EDIV_512 | sequence;
+               return;
        }
 #endif
 
@@ -164,7 +168,7 @@ ao_adc_isr(void) __interrupt 1
 #endif 
 
 #ifdef FETCH_ADC
-       FETCH_ADC()
+       FETCH_ADC();
 #define GOT_ADC
 #endif