X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fattiny%2Fao_clock.c;fp=src%2Fattiny%2Fao_clock.c;h=e5681edbc66858356370df185c08da9c1864a6ce;hp=0669585082bec63d74f2b9585b421756302d303c;hb=b140da92536d7c48ba37868f1c2afce7bb86dfdb;hpb=1d208c9509f03f7e2c913abe5c0dd78ef0083c0f diff --git a/src/attiny/ao_clock.c b/src/attiny/ao_clock.c index 06695850..e5681edb 100644 --- a/src/attiny/ao_clock.c +++ b/src/attiny/ao_clock.c @@ -24,7 +24,7 @@ static volatile AO_TICK_TYPE ao_wakeup_count; ISR(TIMER1_COMPA_vect) { ++ao_tick_count; - if ((int16_t) (ao_tick_count - ao_wakeup_count) >= 0) + if ((AO_TICK_SIGNED) (ao_tick_count - ao_wakeup_count) >= 0) ao_wakeup((void *) &ao_tick_count); } @@ -131,7 +131,7 @@ ao_delay_until(AO_TICK_TYPE target) { cli(); ao_wakeup_count = target; - while ((int16_t) (target - ao_tick_count) > 0) + while ((AO_TICK_SIGNED) (target - ao_tick_count) > 0) ao_sleep((void *) &ao_tick_count); sei(); }