example use library LibThreadProcess
Dependencies: LibThreadProcess mbed-rtos mbed
Fork of rtos_signals by
Revision 4:fde9ea156f7c, committed 2016-05-24
- Comitter:
- AVELARDEV
- Date:
- Tue May 24 06:47:15 2016 +0000
- Parent:
- 3:c133402c77cb
- Commit message:
- first example BlinkLed Library
Changed in this revision
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