Read several IOs of a port at the same time.

Dependencies:   mbed

Revision:
0:f7c4107b448c
Child:
1:a33d077656dc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Feb 21 12:42:41 2014 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+ 
+PortIn myIOs(PortC, 0xE000); // PC_15 + PC_14 + PC_13
+ 
+DigitalOut myled(LED1);
+ 
+int main() {
+  while(1) {
+    if (myIOs.read() != 0xE000) { // Any of the 3 IOs is low
+      myled = !myled; // Toggle LED state
+      wait(0.2);
+    }
+  }
+}
+ 
\ No newline at end of file