X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fcc1111%2Fao_adc.c;h=94af5cda433ba710c16d13beafc2e884cf5d66e6;hp=97a39c4d92a6f66a545253fc5e20a18c7286b32a;hb=1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a;hpb=8ca98dc8c868c47c372d6b666c36e691fa402824 diff --git a/src/cc1111/ao_adc.c b/src/cc1111/ao_adc.c index 97a39c4d..94af5cda 100644 --- a/src/cc1111/ao_adc.c +++ b/src/cc1111/ao_adc.c @@ -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