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.
Dependencies: mbed-rtos-old mbed
Revision 0:3d53a9e8fc73, committed 2015-02-14
- Comitter:
- mbedschool
- Date:
- Sat Feb 14 04:34:14 2015 +0000
- Child:
- 1:f7560a90fe56
- Commit message:
- use thread
Changed in this revision
--- /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