]> www.fi.muni.cz Git - tinyboard.git/blobdiff - projects/step-up/main.c
buttons.c: button on PB0, status LED on PB1
[tinyboard.git] / projects / step-up / main.c
index 20f339e3b79d7305f95cc20cce9af80eef084a27..69657a8a70052d37b5b4cdd1545febfeba8ad456 100644 (file)
@@ -13,32 +13,27 @@ static void hw_setup()
 
        wdt_enable(WDTO_1S);
 
-       //init_battery();
+       init_battery();
        init_pwm();
        init_adc();
 
-       //init_tmr();
-       //init_buttons();
+       init_buttons();
 
        init_pwmled();
-       //init_gpio();
-       //init_ambient();
-       //init_pattern();
-       //init_control();
+       init_pattern();
+       init_control();
 
        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()
@@ -63,7 +58,6 @@ void power_down()
        // ok, so I will wake up
        hw_setup();
 }
-#endif
 
 int main(void)
 {
@@ -72,7 +66,7 @@ int main(void)
        log_set_state(3);
 
        hw_setup();
-       // power_down(); - not while still debugging
+       power_down();
 
        sei();
 #if 1