Interrupt code example for FRDM-KL25Z

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
APanecatl
Date:
Wed Jun 04 19:24:45 2014 +0000
Commit message:
Rev 1.0

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 e1052d370745 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jun 04 19:24:45 2014 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+
+
+DigitalOut RED(LED1);
+DigitalOut BLUE(LED2);
+InterruptIn Interrupt(PTD1);
+
+
+void blink()
+{
+    RED=1;
+    BLUE=0;
+    wait(.4);
+    BLUE=1;
+    wait(.4);
+}
+
+int main() 
+{
+    Interrupt.fall(&blink);
+    
+    BLUE=1;
+    while (1) 
+    {
+        RED=0;
+    }
+       
+}
\ No newline at end of file
diff -r 000000000000 -r e1052d370745 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Jun 04 19:24:45 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/0b3ab51c8877
\ No newline at end of file