yuki hashimoto / Mbed 2 deprecated Timeout

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
hasimo
Date:
Wed Jul 23 10:39:58 2014 +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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jul 23 10:39:58 2014 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+ 
+Timeout timeout;
+DigitalOut led(LED1);
+
+int on = 1;
+
+void attimeout(){
+    on = 0;
+}
+ 
+int main() {
+    timeout.attach(&attimeout, 5);
+ 
+    // spin in a main loop. flipper will interrupt it to call flip
+    while(on) {
+        led = !led;
+        wait(0.2);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Jul 23 10:39:58 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file