2 #include <util/delay.h>
4 #include <avr/interrupt.h>
10 static void hw_setup()
25 set_sleep_mode(SLEEP_MODE_IDLE);
28 static void hw_suspend()
45 set_sleep_mode(SLEEP_MODE_PWR_DOWN);
55 // allow wakeup by long button-press only
56 } while (!buttons_wait_for_release());
58 // ok, so I will wake up
66 power_usi_disable(); // Once for lifetime
67 ACSRA |= _BV(ACD); // disable analog comparator