Switch from GPLv2 to GPLv2+
[fw/altos] / src / cc1111 / ao_adc.c
index 97a39c4d92a6f66a545253fc5e20a18c7286b32a..94af5cda433ba710c16d13beafc2e884cf5d66e6 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,6 +20,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 +86,7 @@ ao_adc_isr(void) __interrupt 1
                else
 #endif
                        ADCCON3 = ADCCON3_EREF_VDD | ADCCON3_EDIV_512 | sequence;
+               return;
        }
 #endif