Fix clockCyclesPerMicrosecond Change from fixed value to current value (#3993)
This commit is contained in:
parent
c1a7198e7d
commit
a55265f74b
@ -78,7 +78,7 @@
|
|||||||
#define interrupts() sei()
|
#define interrupts() sei()
|
||||||
#define noInterrupts() cli()
|
#define noInterrupts() cli()
|
||||||
|
|
||||||
#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
|
#define clockCyclesPerMicrosecond() ( (long int)getCpuFrequencyMhz() )
|
||||||
#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )
|
#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )
|
||||||
#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() )
|
#define microsecondsToClockCycles(a) ( (a) * clockCyclesPerMicrosecond() )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user