From b0dc9758a366ba2c7b2c1ba3fd13ce83fd1415fc Mon Sep 17 00:00:00 2001 From: Karl Fessel Date: Mon, 13 Nov 2017 17:31:13 +0100 Subject: [PATCH] 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. --- cores/arduino/wiring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/arduino/wiring.c b/cores/arduino/wiring.c index 9727135..155505e 100644 --- a/cores/arduino/wiring.c +++ b/cores/arduino/wiring.c @@ -37,7 +37,7 @@ volatile unsigned long timer0_overflow_count = 0; volatile unsigned long timer0_millis = 0; -static unsigned char timer0_fract = 0; +volatile unsigned char timer0_fract = 0; #if defined(TIM0_OVF_vect) ISR(TIM0_OVF_vect)