]> www.fi.muni.cz Git - tinyboard.git/blobdiff - projects/step-up/main.c
power off by default, power on/off with button
[tinyboard.git] / projects / step-up / main.c
index 383aa5eed990ead218315efe687846100b1f3df0..69657a8a70052d37b5b4cdd1545febfeba8ad456 100644 (file)
@@ -26,16 +26,14 @@ static void hw_setup()
        set_sleep_mode(SLEEP_MODE_IDLE);
 }
 
-#if 0
 static void hw_suspend()
 {
        susp_pwm();
        susp_adc();
-       susp_tmr();
-       susp_gpio();
        susp_buttons();
 
        wdt_disable();
+       power_all_disable();
 }
 
 void power_down()
@@ -60,7 +58,6 @@ void power_down()
        // ok, so I will wake up
        hw_setup();
 }
-#endif
 
 int main(void)
 {
@@ -69,7 +66,7 @@ int main(void)
        log_set_state(3);
 
        hw_setup();
-       // power_down(); - not while still debugging
+       power_down();
 
        sei();
 #if 1