projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/easytimer-v2: Generate combined .ihx file for seeed testing
[fw/altos]
/
src
/
attiny
/
ao_clock.c
diff --git
a/src/attiny/ao_clock.c
b/src/attiny/ao_clock.c
index 0669585082bec63d74f2b9585b421756302d303c..e5681edbc66858356370df185c08da9c1864a6ce 100644
(file)
--- 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;
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);
}
ao_wakeup((void *) &ao_tick_count);
}
@@
-131,7
+131,7
@@
ao_delay_until(AO_TICK_TYPE target)
{
cli();
ao_wakeup_count = 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();
}
ao_sleep((void *) &ao_tick_count);
sei();
}