Adjust sleep time by ticks instead of seconds, proposed by Ivan Delamer

This commit is contained in:
David Kopf 2011-09-10 12:44:49 -04:00
parent ab0c04b041
commit f721f646fa
3 changed files with 46 additions and 20 deletions

View file

@ -224,8 +224,8 @@ void micro_sleep(uint8_t howlong)
sleep_mode(); // Sleep
/* Adjust clock.c for the time spent sleeping */
extern void clock_adjust_seconds(uint8_t howmany);
clock_adjust_seconds(howlong);
extern void clock_adjust_ticks(uint16_t howmany);
clock_adjust_ticks(howlong * CLOCK_SECOND);
// if (TIMSK2&(1<<OCIE2A)) break; // Exit sleep if not awakened by TIMER2
PRINTF(".");