Joscha Ihl
/
Nucleo_rtos_basic3
test
Revision 0:dc0a61d94e89, committed 2017-10-17
- Comitter:
- joschaihl
- Date:
- Tue Oct 17 08:21:46 2017 +0000
- Commit message:
- test
Changed in this revision
diff -r 000000000000 -r dc0a61d94e89 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Oct 17 08:21:46 2017 +0000 @@ -0,0 +1,26 @@ +#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; + } +}
diff -r 000000000000 -r dc0a61d94e89 mbed-rtos.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Tue Oct 17 08:21:46 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#bdd541595fc5
diff -r 000000000000 -r dc0a61d94e89 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 17 08:21:46 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/86740a56073b \ No newline at end of file