X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fattiny%2Fao_clock.c;h=2ac0500b217f307466fd8be143eae566969eac89;hb=refs%2Fheads%2Fmaster;hp=0669585082bec63d74f2b9585b421756302d303c;hpb=b8a9273162b7016afc29f4c98fc3b66324d4c85b;p=fw%2Faltos 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(); }