X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fattiny%2Fao_clock.c;h=0669585082bec63d74f2b9585b421756302d303c;hb=71674569800c58db0a9f3d63495c0e1341e51b32;hp=22de8e99352d5041b09bd50af63376e2329ff563;hpb=fcdaa0d748058a7f52a1bdc1a1627dc394762e5a;p=fw%2Faltos diff --git a/src/attiny/ao_clock.c b/src/attiny/ao_clock.c index 22de8e99..06695850 100644 --- a/src/attiny/ao_clock.c +++ b/src/attiny/ao_clock.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 @@ -27,10 +28,10 @@ ISR(TIMER1_COMPA_vect) ao_wakeup((void *) &ao_tick_count); } -uint16_t +AO_TICK_TYPE ao_time(void) { - uint16_t r; + AO_TICK_TYPE r; cli(); r = ao_tick_count; @@ -126,7 +127,7 @@ void ao_delay_us(uint16_t us) } void -ao_delay_until(uint16_t target) +ao_delay_until(AO_TICK_TYPE target) { cli(); ao_wakeup_count = target; @@ -136,7 +137,7 @@ ao_delay_until(uint16_t target) } void -ao_delay(uint16_t ticks) +ao_delay(AO_TICK_TYPE ticks) { ao_delay_until(ao_time() + ticks); }