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.
Diff: main.cpp
- Revision:
- 5:476186ff82cf
- Parent:
- 4:fc60c5b6c104
- Child:
- 7:49b71bc18049
--- a/main.cpp	Wed Jan 11 15:07:51 2017 +0000
+++ b/main.cpp	Fri Jan 13 19:50:30 2017 +0000
@@ -1,6 +1,6 @@
 #include "mbed.h"
-#include "rtos.h"
 
+Thread thread;
 DigitalOut led(LED1);
 
 void led_thread() {
@@ -12,12 +12,10 @@
 }
 
 int main (void) {
-    Thread thread;
-
     thread.start(callback(led_thread));
 
     while (true) {
-        Thread::wait(1000);
+        wait(1);
         thread.signal_set(0x1);
     }
 }