5 #include <LUFA/Common/Common.h>
10 volatile clock_time_t clock_datetime
= 0;
13 ISR(TIMER1_COMPA_vect
, ISR_BLOCK
)
18 //Initialise the clock
21 OCR1A
= (((F_CPU
/ 1024) / 100) - 1);
22 TCCR1B
= ((1 << WGM12
) | (1 << CS12
) | (1 << CS10
));
23 TIMSK1
= (1 << OCIE1A
);
27 clock_time_t
clock_time()
31 GlobalInterruptDisable();
32 time
= clock_datetime
;
33 GlobalInterruptEnable();