mbed-rtos support for nucleo f401re

Dependencies:   mbed-rtos_F401 mbed-src

Fork of rtos_basic by mbed official

main.cpp

Committer:
abdess
Date:
2014-06-25
Revision:
12:f57ce5b102d3
Parent:
8:88582a97af69

File content as of revision 12:f57ce5b102d3:

#include "mbed.h"
#include "rtos.h"
 
Serial pc(SERIAL_TX, SERIAL_RX);
DigitalOut led2(LED2);
 
void led2_thread(void const *args) {
    while (true) {
        led2 = !led2;
        Thread::wait(1000);
    }
}
 
int main() {
    Thread thread(led2_thread);
    int i = 1;
   
    while(1) { 
      wait(1);
       pc.printf("main thread running !\n");
       Thread::wait(1000);
  }
}