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 1:8281c17352c6, committed 2012-07-13
- Comitter:
- emilmont
- Date:
- Fri Jul 13 14:49:40 2012 +0000
- Parent:
- 0:9197b24e0e31
- Child:
- 2:7dc6330b7848
- Commit message:
- First implementation
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 |
--- a/main.cpp Fri Jul 13 14:47:16 2012 +0000
+++ b/main.cpp Fri Jul 13 14:49:40 2012 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "cmsis_os.h"
+
+DigitalOut led(LED1);
+
+void led_thread(void const *argument) {
+ while (true) {
+ // Signal flags that are reported as event are automatically cleared.
+ osSignalWait(0x1, osWaitForever);
+ led = !led;
+ }
+}
+osThreadDef(led_thread, osPriorityNormal, DEFAULT_STACK_SIZE);
+
+int main (void) {
+ osThreadId tid = osThreadCreate(osThread(led_thread), NULL);
+
+ while (true) {
+ osDelay(1000);
+ osSignalSet(tid, 0x1);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Fri Jul 13 14:49:40 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#01158bb7600c
