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:f23656783084, committed 2012-05-14
- Comitter:
- emilmont
- Date:
- Mon May 14 14:15:01 2012 +0000
- Commit message:
Changed in this revision
export.bld | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r f23656783084 export.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/export.bld Mon May 14 14:15:01 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/737756e0b479
diff -r 000000000000 -r f23656783084 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon May 14 14:15:01 2012 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" +#include "cmsis_os.h" + +DigitalOut led1(LED1); +DigitalOut led2(LED2); + +void led2_thread(void const *argument) { + while (true) { + led2 = !led2; + osDelay(1000); + } +} +osThreadDef(led2_thread, osPriorityNormal, 1, DEFAULT_STACK_SIZE); + +int main() { + osThreadCreate(osThread(led2_thread), NULL); + + while (true) { + led1 = !led1; + osDelay(500); + } +}