Bubble display example using NXP PCAL9555A GPIO expander

Dependencies:   mbed-dev

Fork of PCAL9555_Hello by InetrfaceProducts NXP

Revision:
0:26310705044b
Child:
1:15df36975a85
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Mar 07 13:05:21 2015 +0000
@@ -0,0 +1,18 @@
+#include    "mbed.h"
+#include    "PCAL9555.h"
+
+PCAL9555    gpio( p28, p27, 0x40 );
+
+int main()
+{
+    gpio.configure( 0xFFFF );           //  Set all pins: input
+    printf( "  0x%04X\r\n", (int)gpio );//  Print pins state
+
+    gpio.configure( 0x0000 );           //  Set all pins: output
+    
+    int count   = 0;
+    
+    while(1) {
+        gpio.write( count++ );
+    }
+}