* 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
Diff: PCA9547.cpp
- Revision:
- 1:c388983364cc
- Parent:
- 0:2d777d5d7e6b
--- 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(); }