I need to control multiple I2C devices on the same bus. This seems like a reasonable requirement since I2C is inherently designed as a multi-master bus. However, when I try to create two devices, I get an exception on creating the second device. Example:
var i2c1 = new I2CDevice(new I2CDevice.Configuration(0x60, 10)); var i2c2 = new I2CDevice(new I2CDevice.Configuration(0x7B, 40));
I get an InvalidOperationException on the second line.
Looking into the firmware source, it looks like it is because I2CDevice is trying to reserve the output pins twice, which fails. Surely, they don't expect me to create a new instance of I2CDevice for each and every transaction? That just seems mega inefficient.
Any I2C users out there had similar problem? What's the right way to manage multiple devices?