PCF8574 I2C IO Expander Interface

Dependents:   PCF8574_HelloWorld PCF8574_I2C_4x4_Keypad PCF8574_I2C_4x4_Keypad_interface PCF8574_ButtonPress

Files at this revision

API Documentation at this revision

Comitter:
simon
Date:
Thu Jun 03 13:00:49 2010 +0000
Parent:
0:ab4e14b911ee
Commit message:

Changed in this revision

PCF8574.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r ab4e14b911ee -r ec8da0c59403 PCF8574.cpp
--- a/PCF8574.cpp	Thu Jun 03 12:56:21 2010 +0000
+++ b/PCF8574.cpp	Thu Jun 03 13:00:49 2010 +0000
@@ -30,12 +30,12 @@
 
 int PCF8574::read() {
     char foo[1];
-    _i2c.read(_addr, foo, 1);
+    _i2c.read(_address, foo, 1);
     return foo[0];
 }
 
 void PCF8574::write(int data) {
     char foo[1];
     foo[0] = data;
-    _i2c.write(_addr, foo, 1);
+    _i2c.write(_address, foo, 1);
 }