"What approach do folks use for..." <- > <@shakencodes:matrix.org> What approach do folks use for having multiple drivers share a resource like an I2C or SPI bus? For example, I am using eldruin's excellent eeprom24x driver and need to write a driver for an ADC on the same I2C bus. The Eeprom24x driver's new() appears to take and retain ownership of the I2C resource on creation. (I'm certain this is a solved problem and would prefer not reinventing the solution.) > Approaches I have thought of: > - creating and deleting each driver as it gets used in the task that owns the I2C processing > - create a singleton object that wraps the i2C bus and can be created and distributed to each driver. (Need to place actual ownership in a Mutex or similar.) Again, place all the operations in a single loop so we can ensure only one is taking place at a give time &mut