Flavio Lombella
/
Example_9_9
Versione migliorata dell'esempio 9.8, due funzioni vengono create e stampano su stdout
Diff: main.cpp
- Revision:
- 0:68b32e1c7187
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Apr 06 14:18:44 2022 +0000 @@ -0,0 +1,20 @@ +// Example 9.9 + +#include "mbed.h" +#include "rtos.h" + +void fun_1(void const *args) { + while (true) { + printf("Thread 1 ... ... \n\r"); + Thread::wait(200); + } +} + +int main() { + Thread thread(fun_1); + + while (true) { + printf("Main Loop Thread ... ... \n\r"); + Thread::wait(100); + } +}