2 #include <avr/interrupt.h>
6 volatile uint16_t jiffies;
7 #define PATTERN_DIV 5 // clk/10
8 static unsigned char pattern_div;
13 TCCR0B = _BV(CS02) | _BV(CS00); // CLK/1024 = 1 kHz
18 pattern_div = PATTERN_DIV;
21 ISR(TIMER0_COMPA_vect)
25 if (--pattern_div == 0) {
26 timer_check_buttons();
28 pattern_div = PATTERN_DIV;