X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Favr%2Fao_adc_avr.c;h=2aae95ace70054fb14a14ac83868fad43f9569f6;hp=231512b2136e4993e54d9daa5a5c8f0109bfd250;hb=bed019b64d9e37f276ad5aa2dabb7681aae122ec;hpb=f34f0ac7f355149446374a4c82dbf004919bc2dd diff --git a/src/avr/ao_adc_avr.c b/src/avr/ao_adc_avr.c index 231512b2..2aae95ac 100644 --- a/src/avr/ao_adc_avr.c +++ b/src/avr/ao_adc_avr.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 @@ -18,8 +19,8 @@ #include "ao.h" #include "ao_pwmin.h" -volatile __xdata struct ao_data ao_data_ring[AO_DATA_RING]; -volatile __data uint8_t ao_data_head; +volatile struct ao_data ao_data_ring[AO_DATA_RING]; +volatile uint8_t ao_data_head; #ifdef TELESCIENCE const uint8_t adc_channels[AO_LOG_TELESCIENCE_NUM_ADC] = { @@ -118,16 +119,16 @@ ao_adc_poll(void) } void -ao_data_get(__xdata struct ao_data *packet) +ao_data_get(struct ao_data *packet) { uint8_t i = ao_data_ring_prev(ao_data_head); memcpy(packet, (void *) &ao_data_ring[i], sizeof (struct ao_data)); } static void -ao_adc_dump(void) __reentrant +ao_adc_dump(void) { - static __xdata struct ao_data packet; + static struct ao_data packet; uint8_t i; ao_data_get(&packet); printf("tick: %5u", packet.tick); @@ -136,7 +137,7 @@ ao_adc_dump(void) __reentrant printf("\n"); } -__code struct ao_cmds ao_adc_cmds[] = { +const struct ao_cmds ao_adc_cmds[] = { { ao_adc_dump, "a\0ADC" }, { 0, NULL }, };