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
Diff: timer.c
- Revision:
- 25:81014a201736
- Parent:
- 24:6c9833e2a049
- Child:
- 26:0421132e6eaf
--- a/timer.c Mon Jan 22 18:35:11 2018 +0000
+++ b/timer.c Mon Jan 22 18:54:23 2018 +0000
@@ -1,6 +1,7 @@
#include <stdint.h>
#include "peripherals.h"
+#include "timer.h"
void TimerInit()
{
@@ -28,5 +29,5 @@
uint32_t TimerSinceMs(uint32_t startCount)
{
uint32_t count = LPC_TIM0->TC - startCount;
- return count / 96000;
+ return count / TIMER_COUNT_PER_MS;
}