Changed the bitwise OR.
Revision 5:e5bb35ac2c61, committed 2011-08-25
- Comitter:
- Lerche
- Date:
- Thu Aug 25 08:00:41 2011 +0000
- Parent:
- 4:032e37009fc1
- Commit message:
- Some troubles with data
Changed in this revision
PCF8575.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 032e37009fc1 -r e5bb35ac2c61 PCF8575.cpp --- 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) {