* PCA9547 library * +++++ Based on; https://developer.mbed.org/users/okano/code/PCA9547/ +++++ * * PCA9547: an I2C bus multiplexer control library * * PCA9547 is an I2C multiplexer which enables to select 1:8 multiplexed I2C bus. * The multiplexer is useful for deviding I2C bus to avoiding slave address conflict and separating capacitive loads. * * For more information about PCA9547: * http://www.nxp.com/documents/data_sheet/PCA9547.pdf
Revision 1:c388983364cc, committed 2015-10-02
- Comitter:
- AkinoriHashimoto
- Date:
- Fri Oct 02 05:46:31 2015 +0000
- Parent:
- 0:2d777d5d7e6b
- Commit message:
- resetpin adj.
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 |
--- a/PCA9547.cpp Fri Oct 02 05:37:18 2015 +0000 +++ b/PCA9547.cpp Fri Oct 02 05:46:31 2015 +0000 @@ -22,12 +22,18 @@ PCA9547::PCA9547( PinName sda, PinName scl, char i2c_address ) : i2c_p( new I2C( sda, scl ) ), i2c( *i2c_p ), i2c_addr( i2c_address ) +#ifdef PCA9547_RESET + resetPin(PCA9547_RESET) +#endif { this->init(); } PCA9547::PCA9547( I2C &i2c_, char i2c_address ) : i2c_p( NULL ), i2c( i2c_ ), i2c_addr( i2c_address ) +#ifdef PCA9547_RESET + resetPin(PCA9547_RESET) +#endif { this->init(); }
--- a/PCA9547.h Fri Oct 02 05:37:18 2015 +0000 +++ b/PCA9547.h Fri Oct 02 05:46:31 2015 +0000 @@ -98,7 +98,7 @@ I2C &i2c; char i2c_addr; #ifdef PCA9547_RESET - DigitalOut resetPin(PCA9547_RESET); + DigitalOut resetPin;//(PCA9547_RESET); #endif void init();