Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 4:c7d265a01e7e, committed 2016-01-04
- Comitter:
- Jeej
- Date:
- Mon Jan 04 15:46:49 2016 +0000
- Parent:
- 3:f57d754b1814
- Commit message:
- Version using mbed rtos. (does not compile due to mbed bad implementation)
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed-rtos.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Nov 06 10:13:20 2014 +0000 +++ b/main.cpp Mon Jan 04 15:46:49 2016 +0000 @@ -1,12 +1,16 @@ #include "mbed.h" +#include "rtos.h" + DigitalOut myled(LED1); int main() { - while(1) { + while(true) + { + // Wait to avoid beeing stuck in loop myled = 1; // LED is ON - wait(0.2); // 200 ms + Thread::wait(200); // 200 ms myled = 0; // LED is OFF - wait(1.0); // 1 sec + Thread::wait(1000); // 1 sec } }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Mon Jan 04 15:46:49 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#79d2f32f753f