Blinky disco lights for the K64F implemented with RTOS threads.

Dependencies:   mbed-rtos mbed

Fork of K64F-RTOS-Disco-LEDs by Mark Bundgus

Files at this revision

API Documentation at this revision

Comitter:
bundgus
Date:
Thu Aug 07 03:03:03 2014 +0000
Commit message:
Initial Commit

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r f1e76cd00a6e main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Aug 07 03:03:03 2014 +0000
@@ -0,0 +1,37 @@
+#include "mbed.h"
+#include "rtos.h"
+
+void blinkLED1(void const *args) {
+    DigitalOut led1(LED1);
+    while(true){
+        led1 = !led1;
+        Thread::wait(300);
+    }
+}
+
+void blinkLED2(void const *args) {
+    DigitalOut led2(LED2);
+    while(true){
+        led2 = !led2;
+        Thread::wait(500);
+    }
+}
+
+void blinkLED3(void const *args) {
+    DigitalOut led3(LED3);
+    while(true){
+        led3 = !led3;
+        Thread::wait(800);
+    }
+}
+int main() {
+
+    Thread thread1(blinkLED1);
+    Thread thread2(blinkLED2);
+    Thread thread3(blinkLED3);
+
+    while (true) {
+        Thread::wait(250);
+    }
+
+}
diff -r 000000000000 -r f1e76cd00a6e mbed-rtos.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Thu Aug 07 03:03:03 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-rtos/#34e80e862021
diff -r 000000000000 -r f1e76cd00a6e mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Aug 07 03:03:03 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6213f644d804
\ No newline at end of file