Simon Ford / Mbed 2 deprecated semihost_powerdown

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
simon
Date:
Wed Oct 13 09:22:53 2010 +0000
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r befbda1bf4cd main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Oct 13 09:22:53 2010 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+#define USR_POWERDOWN    (0x104)
+int semihost_powerdown() {
+    uint32_t arg;
+    return __semihost(USR_POWERDOWN, &arg); 
+}
+
+DigitalOut myled(LED1);
+DigitalOut result(LED2);
+
+int main() {
+    for(int i=0; i<10; i++) {
+        myled = !myled;
+        wait(0.2);
+    }
+
+    result = semihost_powerdown();
+        
+    while(1) {
+        myled = !myled;
+        wait(0.2);
+    }
+}
diff -r 000000000000 -r befbda1bf4cd mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Oct 13 09:22:53 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e