From bb2955ea4bb5c0f9431653351a47b373a2391389 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 4 Sep 2011 02:12:45 +0200 Subject: Added systick based sleep(). --- main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index ea6490d..040610c 100644 --- a/main.cpp +++ b/main.cpp @@ -1,6 +1,7 @@ #include "stm32.h" #include "interrupt.h" #include "thread.h" +#include "time.h" #include "ppmsum.h" #include "i2c.h" @@ -69,6 +70,9 @@ uint32_t thstack[1024]; Thread thread(thstack, sizeof(thstack), threadmain); int main() { + // Initialize system timer. + Time::init(); + RCC.enable(RCC.AFIO); RCC.enable(RCC.IOPA); RCC.enable(RCC.IOPB); -- cgit v1.2.3