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 0:80c3517c7928, committed 2014-06-21
- Comitter:
- greenroshks
- Date:
- Sat Jun 21 06:46:14 2014 +0000
- Commit message:
- Resetting program
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Jun 21 06:46:14 2014 +0000 @@ -0,0 +1,40 @@ +#include "mbed.h" +#include "rtos.h" + +Timer t; +DigitalOut myled(LED1); +Serial pc(USBTX,USBRX); +Thread *thp; + +void stuff(void const * args) +{ + // int a; + while(1) + { + pc.printf("\nhey \n"); + t.start(); + pc.getc(); + t.stop(); + t.reset(); + pc.printf("\nGottil\n"); + } +} +int main() +{ + thp = new Thread(stuff); + while(1) + { + if(t.read()>10.0) + { + t.stop(); + t.reset(); + thp->terminate(); + delete thp; + thp=new Thread(stuff); + + pc.printf("restarted"); + } + + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Sat Jun 21 06:46:14 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#ac8d036315ed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Jun 21 06:46:14 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721 \ No newline at end of file