Joscha Ihl
/
Nucleo_rtos_basic3
test
main.cpp
- Committer:
- joschaihl
- Date:
- 2017-10-17
- Revision:
- 0:dc0a61d94e89
File content as of revision 0:dc0a61d94e89:
#include "mbed.h" #include "rtos.h" #include <iostream> using namespace std; DigitalOut led1(LED1); void print_thread(void const *argument) { while (true) { Thread::wait(1000); cout << "print_thread!\r" << endl; } } int main() { cout << "BASIC EXAMPLE\r\n"; Thread thread(print_thread, NULL, osPriorityNormal, DEFAULT_STACK_SIZE); while (true) { led1 = !led1; Thread::wait(500); cout << "LED Thread\r" << endl; } }