X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fkernel%2Fao_log_tiny.c;h=046b7b204a200a9a5a9fb0722d6511d7edd47d91;hb=8115c78dc487c7b5d57038dbb26daa75357796b0;hp=67767dc9ce285c88aeaa0510889be3aa906e8557;hpb=24167015705ae831692b95735968b04a876f935e;p=fw%2Faltos diff --git a/src/kernel/ao_log_tiny.c b/src/kernel/ao_log_tiny.c index 67767dc9..046b7b20 100644 --- a/src/kernel/ao_log_tiny.c +++ b/src/kernel/ao_log_tiny.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 @@ -28,8 +29,6 @@ static __data uint16_t ao_log_tiny_interval; #define AO_PAD_RING 2 #endif -__code uint8_t ao_log_format = AO_LOG_FORMAT_TINY; - void ao_log_tiny_set_interval(uint16_t ticks) { @@ -42,7 +41,7 @@ static void ao_log_tiny_data(uint16_t d) if (ao_log_current_pos >= ao_log_end_pos && ao_log_running) ao_log_stop(); if (ao_log_running) { - ao_storage_write(ao_log_current_pos, DATA_TO_XDATA(&d), 2); + ao_storage_write(ao_log_current_pos, &d, 2); ao_log_current_pos += 2; } } @@ -103,7 +102,7 @@ ao_log(void) /* * Add in pending sample data */ - ao_sleep(DATA_TO_XDATA(&ao_sample_data)); + ao_sleep(&ao_sample_data); while (ao_log_data != ao_sample_data) { sum += ao_data_pres(&ao_data_ring[ao_log_data]); count++; @@ -148,7 +147,7 @@ ao_log(void) } } -uint16_t +int16_t ao_log_flight(uint8_t slot) { static __xdata uint16_t flight;