Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
timer/timer.h@35:ba9f575aa3c6, 2018-12-01 (annotated)
- Committer:
- andrewboyson
- Date:
- Sat Dec 01 15:43:59 2018 +0000
- Revision:
- 35:ba9f575aa3c6
- Parent:
- timer.h@33:b9e3c06e7dab
- Child:
- 39:5b594b1b6a0a
Tidied and separated the library into high res timer; low res tick counter rtc; tm local and utc; and clock folders
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| andrewboyson | 24:6c9833e2a049 | 1 | #include <stdint.h> |
| andrewboyson | 26:0421132e6eaf | 2 | #include <stdbool.h> |
| andrewboyson | 24:6c9833e2a049 | 3 | |
| andrewboyson | 24:6c9833e2a049 | 4 | extern uint32_t TimerNowCount(void); |
| andrewboyson | 26:0421132e6eaf | 5 | extern uint32_t TimerIntervalCount(uint32_t* pLastCount); |
| andrewboyson | 24:6c9833e2a049 | 6 | extern uint32_t TimerSinceCount(uint32_t startCount); |
| andrewboyson | 25:81014a201736 | 7 | extern uint32_t TimerSinceMs(uint32_t startCount); |
| andrewboyson | 33:b9e3c06e7dab | 8 | extern bool TimerIntervalHasElapsed(uint32_t* pBaseCount, uint32_t intervalCount); |
| andrewboyson | 25:81014a201736 | 9 | |
| andrewboyson | 33:b9e3c06e7dab | 10 | extern int32_t TimerMultiplyFractionalPart(int32_t value, uint32_t timerCountSinceStart, 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); |