Example Interrupt code for FRDM platforms

Dependencies:   mbed

Fork of frdm_interrupt by Freescale

Revision:
0:4dcd605c8931
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Apr 03 08:49:54 2014 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+
+DigitalOut led_red(LED_RED);
+InterruptIn sw2(SW2);
+
+void sw2_release(void)
+{
+    led_red = !led_red;
+    printf("On-board button SW2 was released.\n");
+}
+
+int main()
+{
+    sw2.rise(&sw2_release);
+    while (true) {
+    }
+}