You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an I2c "multiplexer" now available that allows for re-using multiple I2C addresses on the same I2C bus (ref TCA9548A ). An implementation of the multiplexer in Kotlin is at I2CMultiplexer.kt. This implementation works wonderfully when all the devices with the same address are attached to the multiplexer.
However...
If device A with address 0xF0 is attached to the "main" I2C bus and device B with address 0xF0 is attached to the multiplexer, one of the devices will fail due to DeviceAlreadyOpenedException. In practice, this device "re-use" is allowed per the I2C protocol (I think when a multiplexer channel is activated, that becomes the I2C "bus-master" until reset).
The enhancement would be to modify the creation of the InternalI2CDeviceInterface to check for a pre-registered device and return that in lieu of throwing the duplicate device exception.
The text was updated successfully, but these errors were encountered:
There is a "workaround" which does pretty much what the above suggests, but I think it would probably be better suited to the device factories themselves.
There is an I2c "multiplexer" now available that allows for re-using multiple I2C addresses on the same I2C bus (ref TCA9548A ). An implementation of the multiplexer in Kotlin is at I2CMultiplexer.kt. This implementation works wonderfully when all the devices with the same address are attached to the multiplexer.
However...
If device A with address
0xF0
is attached to the "main" I2C bus and device B with address0xF0
is attached to the multiplexer, one of the devices will fail due toDeviceAlreadyOpenedException
. In practice, this device "re-use" is allowed per the I2C protocol (I think when a multiplexer channel is activated, that becomes the I2C "bus-master" until reset).The enhancement would be to modify the creation of the
InternalI2CDeviceInterface
to check for a pre-registered device and return that in lieu of throwing the duplicate device exception.The text was updated successfully, but these errors were encountered: