mbed-rtos support for nucleo f401re
Dependencies: mbed-rtos_F401 mbed-src
Fork of rtos_basic by
Revision 7:ae8015ac5102, committed 2014-04-19
- Comitter:
- abdess
- Date:
- Sat Apr 19 13:00:51 2014 +0000
- Parent:
- 6:209f4db62daf
- Child:
- 8:88582a97af69
- Commit message:
- add rtos support for stm32F401RE
Changed in this revision
--- a/main.cpp Tue Jun 04 16:01:32 2013 +0100 +++ b/main.cpp Sat Apr 19 13:00:51 2014 +0000 @@ -1,7 +1,7 @@ #include "mbed.h" #include "rtos.h" -DigitalOut led1(LED1); +Serial pc(SERIAL_TX, SERIAL_RX); DigitalOut led2(LED2); void led2_thread(void const *args) { @@ -13,9 +13,34 @@ int main() { Thread thread(led2_thread); - + int i = 1; + + while(1) { + wait(1); + pc.printf("main thread running !\n"); + Thread::wait(1000); + } +} +#include "mbed.h" +#include "rtos.h" + +Serial pc(SERIAL_TX, SERIAL_RX); +DigitalOut led2(LED2); + +void led2_thread(void const *args) { while (true) { - led1 = !led1; - Thread::wait(500); + 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); + } +}
--- a/mbed-rtos.lib Tue Jun 04 16:01:32 2013 +0100 +++ b/mbed-rtos.lib Sat Apr 19 13:00:51 2014 +0000 @@ -1,1 +1,1 @@ -https://mbed.org/users/mbed_official/code/mbed-rtos/ \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed-rtos/#4ef72665e2c8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-src.lib Sat Apr 19 13:00:51 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-src/#6870f452afa4
--- a/mbed.bld Tue Jun 04 16:01:32 2013 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/ \ No newline at end of file