mbed school / Mbed 2 deprecated mbed_thread

Dependencies:   mbed-rtos-old mbed

Files at this revision

API Documentation at this revision

Comitter:
mbedschool
Date:
Sat Feb 14 04:34:14 2015 +0000
Child:
1:f7560a90fe56
Commit message:
use thread

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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Feb 14 04:34:14 2015 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+#include "rtos.h"
+
+DigitalOut myled(LED1);
+bool c=false;
+void led1_thread(void const *argument) {
+    
+    while (!c) {
+        myled = !myled;
+        Thread::wait(200);
+    }
+    myled=1;
+}
+int main() {
+    
+    Thread th1(led1_thread);   
+    while(1) {
+        unsigned long n=100000000;
+        float x=0;
+        while(x*x <n)
+            x = x + 0.01 ;   
+        c=true;
+    }
+    
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Sat Feb 14 04:34:14 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-rtos/#0c8426fdeb21
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Feb 14 04:34:14 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e188a91d3eaa
\ No newline at end of file