2 #include <avr/interrupt.h>
6 volatile uint16_t timer_count = 0;
8 // Configure timer 0 to generate a timer overflow interrupt every
9 // 256*1024 clock cycles, or approx 61 Hz when using 16 MHz clock
10 // This demonstrates how to use interrupts to implement a simple
11 // inactivity timeout.
20 void timer_clear(void)
29 uint16_t timer_read(void)
42 uint16_t timer_elapsed(uint16_t last)
51 return TIMER_DIFF(t, last);
54 // This interrupt routine is run approx 61 times per second.
55 // A very simple inactivity timeout is implemented, where we
56 // will send a space character and print a message to the
57 // hid_listen debug message window.