Flavio Lombella / Mbed 2 deprecated Example_9_9

Dependencies:   mbed mbed-rtos

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 // Example 9.9
00002 
00003 #include "mbed.h"
00004 #include "rtos.h"
00005  
00006 void fun_1(void const *args) {
00007     while (true) {
00008         printf("Thread 1 ... ... \n\r");
00009         Thread::wait(200);
00010     }
00011 }
00012 
00013 int main() {
00014     Thread thread(fun_1);
00015     
00016     while (true) {
00017         printf("Main Loop Thread ... ... \n\r");
00018         Thread::wait(100);
00019     }
00020 }