GPIO + IRQ code example for FRDM-KL25Z

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
APanecatl
Date:
Wed Jun 04 19:22:26 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 9bb80fc4800d main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jun 04 19:22:26 2014 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+
+//Delay declared in seconds
+
+DigitalOut Red(LED1);
+DigitalOut Green(LED2);
+DigitalOut Blue(LED3);
+DigitalIn enable(PTB11, PullUp);
+
+
+int main() 
+{
+    while(1)
+    {
+        if(enable) 
+        {
+            Red = 0;
+            wait(.2);
+            Red = 1;
+            wait(1);        
+            
+            Green=0;
+            wait(.2);
+            Green=1;
+            wait(1);
+            
+            Blue=0;
+            wait(.2);
+            Blue=1;
+            wait(1);
+        }
+    }
+}
diff -r 000000000000 -r 9bb80fc4800d mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Jun 04 19:22:26 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/0b3ab51c8877
\ No newline at end of file