Original
Fork of PCA9547 by
Revision 9:d0c2d2b24941, committed 2015-09-04
- Comitter:
- yenzo
- Date:
- Fri Sep 04 21:36:14 2015 +0000
- Parent:
- 8:c716fb3ccb8d
- Commit message:
- No change
Changed in this revision
PCA9547.cpp | Show annotated file Show diff for this revision Revisions of this file |
PCA9547.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r c716fb3ccb8d -r d0c2d2b24941 PCA9547.cpp --- a/PCA9547.cpp Fri Apr 17 03:34:23 2015 +0000 +++ b/PCA9547.cpp Fri Sep 04 21:36:14 2015 +0000 @@ -40,7 +40,8 @@ void PCA9547::select( char channel ) { char data = 0x08 | channel; - + //char data = 0xF8 | channel; + i2c.write( i2c_addr, &data, 1 ); } @@ -50,3 +51,9 @@ i2c.write( i2c_addr, &data, 1 ); } + +char PCA9547::ReadControl (void){ + char data; + i2c.read( i2c_addr | 0x01, &data, 1, 0); + return data; +}
diff -r c716fb3ccb8d -r d0c2d2b24941 PCA9547.h --- a/PCA9547.h Fri Apr 17 03:34:23 2015 +0000 +++ b/PCA9547.h Fri Sep 04 21:36:14 2015 +0000 @@ -88,6 +88,8 @@ * Disable all channels */ void disable( void ); + + char ReadControl (void); private: I2C *i2c_p;