Andrew Boyson / clock

Dependents:   oldheating gps motorhome heating

timer.h

Committer:
andrewboyson
Date:
2018-01-22
Revision:
25:81014a201736
Parent:
24:6c9833e2a049
Child:
26:0421132e6eaf

File content as of revision 25:81014a201736:

#include <stdint.h>

extern void     TimerInit(void);
extern uint32_t TimerPeriodCount(uint32_t* pLastCount);
extern uint32_t TimerNowCount(void);
extern uint32_t TimerSinceCount(uint32_t startCount);
extern uint32_t TimerSinceMs(uint32_t startCount);

#define TIMER_COUNT_PER_SECOND 96000000UL
#define TIMER_COUNT_PER_MS     (TIMER_COUNT_PER_SECOND / 1000);
#define TIMER_COUNT_PER_US     (TIMER_COUNT_PER_MS     / 1000);