Fix clockCyclesPerMicrosecond Change from fixed value to current value (#3993)

This commit is contained in:
TANAKA Masayuki 2020-09-30 21:16:20 +09:00 committed by GitHub
parent c1a7198e7d
commit a55265f74b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@
#define interrupts() sei()
#define noInterrupts() cli()
#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
#define clockCyclesPerMicrosecond() ( (long int)getCpuFrequencyMhz() )
#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )
#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() )