Synchronize two tasks by the help of an event signal. Thread1 (the main() thread) changes the state of LED1 when an event flag arrives. Thread2 sends event flags at reguar intervals. The interesting feature of this demo: how to address thread1 (i.e. the main task)? We use Thread::gettid() to obtain the task ID of the main task.In order to send a signal, we have to use the osSignalSet() function from the underlaying CMSIS RTOS layer. Link:

Dependencies:   mbed-rtos mbed

Download repository: zip gz

Files at revision 0:0bbb855fceaf

Name Size Actions
main.cpp 1080 Revisions Annotate
mbed-rtos.lib 65 Revisions Annotate
mbed.bld 65 Revisions Annotate