Lab 5 - mbed RTOS

Dependencies:   mbed-rtos mbed

Fork of FTF2014_lab5 by Freescale

Revision:
0:5de53f2725a4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Apr 03 09:11:36 2014 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+#include "rtos.h"
+
+DigitalOut led1(LED1);
+
+void led2_thread(void const *argument)
+{
+    while (true) {
+        Thread::wait(2000);
+        printf("Thread 2 \n");
+        fflush(stdout);
+    }
+}
+
+int main()
+{
+    Thread thread(led2_thread);
+
+    while (true) {
+        led1 = !led1;
+        Thread::wait(1000);
+        printf("Thread 1 \n");
+        fflush(stdout);
+    }
+}