In this example the first thread (the main () function) sends signals to the second thread at regular intervals. The second thread waits until an event signal does not arrive. Each time the signal arrives, the program toggles the status of LED1. Note, that the return value of the Thread :: signal_wait () function is examined and is printed out as well. Just for fun thread2: accepts any signal, and thead1 provides all possible signals from 1 to 32768.

Dependencies:   mbed mbed-rtos

Download repository: zip gz

Files at revision 0:bd08296227ad

Name Size Actions
[up]
main.cpp 1214 Revisions Annotate
mbed-rtos.lib 69 Revisions Annotate
mbed.bld 69 Revisions Annotate