From 0e8753eaa816d03591dffed19717a4604ec7c557 Mon Sep 17 00:00:00 2001 From: Karl Fessel Date: Sun, 4 Dec 2016 13:55:26 +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. --- hardware/arduino/avr/cores/arduino/wiring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/arduino/avr/cores/arduino/wiring.c b/hardware/arduino/avr/cores/arduino/wiring.c index b956f787e0a..d70bf8c910a 100644 --- a/hardware/arduino/avr/cores/arduino/wiring.c +++ b/hardware/arduino/avr/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(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) ISR(TIM0_OVF_vect)