example use library LibThreadProcess

Dependencies:   LibThreadProcess mbed-rtos mbed

Fork of rtos_signals by mbed official

Files at this revision

API Documentation at this revision

Comitter:
AVELARDEV
Date:
Tue May 24 06:47:15 2016 +0000
Parent:
3:c133402c77cb
Commit message:
first example BlinkLed Library

Changed in this revision

BlinkLed.lib Show annotated file Show diff for this revision Revisions of this file
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 c133402c77cb -r fde9ea156f7c BlinkLed.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BlinkLed.lib	Tue May 24 06:47:15 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/AVELARDEV/code/LibThreadProcess/#f317d057edde
diff -r c133402c77cb -r fde9ea156f7c main.cpp
--- a/main.cpp	Tue Jun 04 15:54:12 2013 +0100
+++ b/main.cpp	Tue May 24 06:47:15 2016 +0000
@@ -1,21 +1,12 @@
 #include "mbed.h"
-#include "rtos.h"
-
-DigitalOut led(LED1);
+#include "BlinkLed.h"
 
-void led_thread(void const *argument) {
-    while (true) {
-        // Signal flags that are reported as event are automatically cleared.
-        Thread::signal_wait(0x1);
-        led = !led;
-    }
-}
+BlinkLed led1(LED1, 500);
+BlinkLed led2(LED2, 1000);
+BlinkLed led3(LED3, 2000);
 
-int main (void) {
-    Thread thread(led_thread);
-    
-    while (true) {
-        Thread::wait(1000);
-        thread.signal_set(0x1);
-    }
-}
+int main() {
+    led1.startBlink();
+    led2.startBlink();
+    led3.startBlink();
+}
\ No newline at end of file
diff -r c133402c77cb -r fde9ea156f7c mbed-rtos.lib
--- a/mbed-rtos.lib	Tue Jun 04 15:54:12 2013 +0100
+++ b/mbed-rtos.lib	Tue May 24 06:47:15 2016 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed-rtos/
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed-rtos/#162b12aea5f2
diff -r c133402c77cb -r fde9ea156f7c mbed.bld
--- a/mbed.bld	Tue Jun 04 15:54:12 2013 +0100
+++ b/mbed.bld	Tue May 24 06:47:15 2016 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/7c328cabac7e
\ No newline at end of file