We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1a7198 commit a55265fCopy full SHA for a55265f
cores/esp32/Arduino.h
@@ -78,7 +78,7 @@
78
#define interrupts() sei()
79
#define noInterrupts() cli()
80
81
-#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
+#define clockCyclesPerMicrosecond() ( (long int)getCpuFrequencyMhz() )
82
#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )
83
#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() )
84
0 commit comments