Versione migliorata dell'esempio 9.8, due funzioni vengono create e stampano su stdout

Dependencies:   mbed mbed-rtos

main.cpp

Committer:
flombella
Date:
2022-04-06
Revision:
0:68b32e1c7187

File content as of revision 0:68b32e1c7187:

// 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);
    }
}