declare timer0_fract non static and volatile to make it available for linking
using timer0_fract and Timer0s count register it's possible to write more precise millis function that include all milliseconds or return some extra accuracy (eg 1/4 on 1/8 millisecond) with less overhead than micros.
This commit is contained in:
parent
b084848f2e
commit
b0dc9758a3
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
volatile unsigned long timer0_overflow_count = 0;
|
volatile unsigned long timer0_overflow_count = 0;
|
||||||
volatile unsigned long timer0_millis = 0;
|
volatile unsigned long timer0_millis = 0;
|
||||||
static unsigned char timer0_fract = 0;
|
volatile unsigned char timer0_fract = 0;
|
||||||
|
|
||||||
#if defined(TIM0_OVF_vect)
|
#if defined(TIM0_OVF_vect)
|
||||||
ISR(TIM0_OVF_vect)
|
ISR(TIM0_OVF_vect)
|
||||||
|
|
Loading…
Reference in New Issue