X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fcc1111%2Fao_adc.c;h=94af5cda433ba710c16d13beafc2e884cf5d66e6;hp=1523f94a278056dcf3e59ab54248c560752529a6;hb=1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a;hpb=2380a4b9bd69629c78eec0a87ff8681a0524d8d2 diff --git a/src/cc1111/ao_adc.c b/src/cc1111/ao_adc.c index 1523f94a..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 @@ -164,7 +169,7 @@ ao_adc_isr(void) __interrupt 1 #endif #ifdef FETCH_ADC - FETCH_ADC() + FETCH_ADC(); #define GOT_ADC #endif