Added missing API functions microsecondsToClockCycles etc
This commit is contained in:
parent
2c25a5f7dd
commit
b5a5e67ad0
|
@ -98,5 +98,10 @@ typedef unsigned int word;
|
||||||
#ifndef _BV
|
#ifndef _BV
|
||||||
#define _BV(bit) (1 << (bit))
|
#define _BV(bit) (1 << (bit))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
|
||||||
|
#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (F_CPU / 1000L) )
|
||||||
|
#define microsecondsToClockCycles(a) ( (a) * (F_CPU / 1000000L) )
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue