Andrew Boyson / clock

Dependents:   oldheating gps motorhome heating

Committer:
andrewboyson
Date:
Mon Dec 03 12:50:10 2018 +0000
Revision:
39:5b594b1b6a0a
Parent:
35:ba9f575aa3c6
Minor changes to names in timer

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 24:6c9833e2a049 1 #include <stdint.h>
andrewboyson 26:0421132e6eaf 2 #include <stdbool.h>
andrewboyson 24:6c9833e2a049 3
andrewboyson 39:5b594b1b6a0a 4 extern uint32_t TimerCount(void);
andrewboyson 39:5b594b1b6a0a 5 extern uint32_t TimerSinceRepetitive(uint32_t* pLastCount);
andrewboyson 39:5b594b1b6a0a 6 extern uint32_t TimerSinceCount(uint32_t lastCount);
andrewboyson 39:5b594b1b6a0a 7 extern uint32_t TimerSinceMs(uint32_t lastCount);
andrewboyson 39:5b594b1b6a0a 8 extern bool TimerRepetitiveTick(uint32_t* pLastCount, uint32_t interval);
andrewboyson 25:81014a201736 9
andrewboyson 39:5b594b1b6a0a 10 extern int32_t TimerMultiplyFractionalPart(int32_t value, uint32_t timerCountSinceLast, uint32_t interval);
andrewboyson 26:0421132e6eaf 11 extern void TimerInit(void);
andrewboyson 26:0421132e6eaf 12
andrewboyson 25:81014a201736 13 #define TIMER_COUNT_PER_SECOND 96000000UL
andrewboyson 25:81014a201736 14 #define TIMER_COUNT_PER_MS (TIMER_COUNT_PER_SECOND / 1000);
andrewboyson 25:81014a201736 15 #define TIMER_COUNT_PER_US (TIMER_COUNT_PER_MS / 1000);