Case study Embedded System Design
/
Case_Study_rtos_signals
basic with comments
Fork of Case_Study_rtos_signals2 by
Revision 6:6263aeb45282, committed 2015-05-08
- Comitter:
- cathal66
- Date:
- Fri May 08 10:25:23 2015 +0000
- Parent:
- 5:47c0e14dbd4a
- Commit message:
- finished
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 |
diff -r 47c0e14dbd4a -r 6263aeb45282 main.cpp --- 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" } }
diff -r 47c0e14dbd4a -r 6263aeb45282 mbed-rtos.lib --- a/mbed-rtos.lib Fri Feb 13 14:41:31 2015 +0000 +++ b/mbed-rtos.lib Fri May 08 10:25:23 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed-rtos/#83e169389a69 +http://mbed.org/users/mbed_official/code/mbed-rtos/#63988a2238f7