Added missing API functions microsecondsToClockCycles etc

This commit is contained in:
roger@rogerclark.net 2016-05-13 06:17:59 +10:00
parent 2c25a5f7dd
commit b5a5e67ad0
1 changed files with 5 additions and 0 deletions

View File

@ -98,5 +98,10 @@ typedef unsigned int word;
#ifndef _BV
#define _BV(bit) (1 << (bit))
#endif
#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (F_CPU / 1000L) )
#define microsecondsToClockCycles(a) ( (a) * (F_CPU / 1000000L) )
#endif