Commit 280768d8 authored by Jan Kasprzak's avatar Jan Kasprzak
Browse files

main.c modified for ATtiny45/step-up

parent 02b8c741
...@@ -11,21 +11,23 @@ static void hw_setup() ...@@ -11,21 +11,23 @@ static void hw_setup()
{ {
wdt_enable(WDTO_1S); wdt_enable(WDTO_1S);
init_battery(); //init_battery();
init_pwm(); init_pwm();
init_adc(); init_adc();
init_tmr();
init_buttons();
init_pwmled(); //init_tmr();
init_gpio(); //init_buttons();
init_ambient();
init_pattern(); //init_pwmled();
init_control(); //init_gpio();
//init_ambient();
//init_pattern();
//init_control();
set_sleep_mode(SLEEP_MODE_IDLE); set_sleep_mode(SLEEP_MODE_IDLE);
} }
#if 0
static void hw_suspend() static void hw_suspend()
{ {
susp_pwm(); susp_pwm();
...@@ -59,18 +61,19 @@ void power_down() ...@@ -59,18 +61,19 @@ void power_down()
// ok, so I will wake up // ok, so I will wake up
hw_setup(); hw_setup();
} }
#endif
int main(void) int main(void)
{ {
init_log(); init_log();
power_usi_disable(); // Once for lifetime power_usi_disable(); // Once for lifetime
ACSRA |= _BV(ACD); // disable analog comparator ACSR |= _BV(ACD); // disable analog comparator
log_set_state(3); log_set_state(3);
hw_setup(); hw_setup();
power_down(); // power_down(); - not while still debugging
sei(); sei();
#if 1 #if 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment