Skip to content

Commit 66ebcc8

Browse files
committed
Fix micros() underestimation for 12MHz
1 parent eabd762 commit 66ebcc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/wiring.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ unsigned long micros() {
100100

101101
SREG = oldSREG;
102102

103-
return ((m << 8) + t) * (64 / clockCyclesPerMicrosecond());
103+
return clockCyclesToMicroseconds(((m << 8) + t) * 64);
104104
}
105105

106106
void delay(unsigned long ms)

0 commit comments

Comments
 (0)