X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?p=bike-lights.git;a=blobdiff_plain;f=main.c;h=efebdabafb5d2aa30571b65e49ca1683b006a2c6;hp=416a6519dd3313729f203092130bf851ca886472;hb=82fc1468b79eef0ec94d74df7c6f6427571a353a;hpb=01e1d3b0da770db9cc4dc9a7fd649548e60ac0ec diff --git a/main.c b/main.c index 416a651..efebdab 100644 --- a/main.c +++ b/main.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "lights.h" @@ -23,8 +24,9 @@ void hw_setup() int main(void) { log_init(); + wdt_enable(WDTO_1S); - _delay_ms(1500); + _delay_ms(100); hw_setup(); @@ -32,8 +34,10 @@ int main(void) sei(); #if 1 - while (1) + while (1) { + wdt_reset(); sleep_mode(); + } #endif #if 0