mX mbed BaseBoard Ext. Int.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
ashwin_athani
Date:
Wed Dec 08 06:23:52 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 09eedb45b600 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Dec 08 06:23:52 2010 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+
+InterruptIn button(p11);
+DigitalOut led(LED1);
+DigitalOut flash(LED4);
+
+void flip() {
+    led = !led;
+}
+
+int main() {
+    button.rise(&flip);  // attach the address of the flip function to the rising edge
+    while(1) {           // wait around, interrupts will interrupt this!
+        flash = !flash;
+        wait(0.25);
+    }
+}
diff -r 000000000000 -r 09eedb45b600 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Dec 08 06:23:52 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e