Case study Embedded System Design
/
Case_Study_rtos_signals
basic with comments
Fork of Case_Study_rtos_signals2 by
Diff: main.cpp
- Revision:
- 6:6263aeb45282
- Parent:
- 5:47c0e14dbd4a
--- a/main.cpp Fri Feb 13 14:41:31 2015 +0000 +++ b/main.cpp Fri May 08 10:25:23 2015 +0000 @@ -6,7 +6,7 @@ void led_thread(void const *argument) { while (true) { // Signal flags that are reported as event are automatically cleared. - Thread::signal_wait(0x1); //Wait for flag "0x1" to be set after thread wait for 1000 msec + Thread::signal_wait(0x2); //Wait for flag "0x1" to be set after thread wait for 1000 msec led = !led; //toggle the LED } } @@ -16,7 +16,7 @@ while (true) { Thread::wait(1000); //thread wait for 1000 msec - thread.signal_set(0x1); //set the flag for "0x1" + thread.signal_set(0x2); //set the flag for "0x1" } }