def _init_dev_i2c(self, vendor, product, serialname, interface): """Initalize Linux i2c-dev interface.""" return i2cbus.I2CBus('/dev/i2c-%d' % interface['bus_num'])
def __init__(self, bus, dev_addr=DEV_ADDR): self.bus = bus self.dev_addr = dev_addr self.i2cbus = i2cbus.I2CBus(bus)
def __init__(self, bus, dev_addr=DEV_ADDR, prefix=''): self.bus = bus self.dev_addr = dev_addr self.i2cbus = i2cbus.I2CBus(bus) self.prefix = prefix self.is_init = False