src/hello.c
changeset 0 cae83b7bfcf4
child 1 dc293f9aa873
equal deleted inserted replaced
-1:000000000000 0:cae83b7bfcf4
       
     1 #include <avr/interrupt.h>
       
     2 #include <avr/io.h>
       
     3 
       
     4 #define DEBUG_DDR DDRB
       
     5 #define DEBUG_PIN 5
       
     6 #define DEBUG_PORT PORTB
       
     7 
       
     8 #include "debug.h"
       
     9 #include "timer.h"
       
    10 
       
    11 int main (void)
       
    12 {
       
    13     debug_init();
       
    14     timer_init();
       
    15 
       
    16     // init
       
    17     debug_set();
       
    18     sei();
       
    19 
       
    20     unsigned short timeout = 8000;
       
    21 
       
    22     // start
       
    23     while (true) {
       
    24         timer_sleep(timeout);
       
    25         debug_toggle();
       
    26     }
       
    27 }