Changed the bitwise OR.
Diff: PCF8575.cpp
- Revision:
- 5:e5bb35ac2c61
- Parent:
- 0:37337b5a13c0
--- a/PCF8575.cpp Thu Sep 09 08:07:33 2010 +0000 +++ b/PCF8575.cpp Thu Aug 25 08:00:41 2011 +0000 @@ -31,7 +31,7 @@ int PCF8575::read() { char foo[2]; _i2c.read(_address, foo, 2); - return (foo[0] << 8) | foo[1]; + return (foo[1] << 8) | foo[0]; } void PCF8575::write(int data) {