2 #include <util/delay.h>
4 #include <avr/interrupt.h>
23 set_sleep_mode(SLEEP_MODE_IDLE);
26 static void hw_suspend()
42 set_sleep_mode(SLEEP_MODE_PWR_DOWN);
52 // allow wakeup by long button-press only
53 } while (!buttons_wait_for_release());
55 // ok, so I will wake up
63 power_usi_disable(); // Once for lifetime
64 ACSRA |= _BV(ACD); // disable analog comparator