summaryrefslogtreecommitdiff
path: root/time.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-11-19 17:21:31 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-11-19 19:23:33 +0100
commit025a38a1f743fd9e89cbd477abe3f79a8d098097 (patch)
treea1f20c1b6a7f6c418bee641da923ab3d0d7208fe /time.h
parent9e5875f2908c1ce506e7c5712ccabc379f911360 (diff)
Moved os and hal related files into subdirectories.
Diffstat (limited to 'time.h')
-rw-r--r--time.h28
1 files changed, 0 insertions, 28 deletions
diff --git a/time.h b/time.h
deleted file mode 100644
index f43d8a6..0000000
--- a/time.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef TIME_H
-#define TIME_H
-
-#include "stm32.h"
-#include "interrupt.h"
-#include "thread.h"
-
-class Time {
- friend void interrupt<Interrupt::SysTick>();
-
- private:
- static volatile uint32_t systime;
-
- public:
- static void init() {
- STK.LOAD = 72000000 / 8 / 1000; // 1000 Hz.
- STK.CTRL = 0x03;
- }
-
- inline static void sleep(uint32_t ms) {
- ms += systime;
- while(systime < ms) {
- Thread::yield();
- }
- }
-};
-
-#endif