Emilio Monti / cmsis_rtos_basic_export

Files at this revision

API Documentation at this revision

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
--- /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
--- /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);
+    }
+}