Пример #1
0
 def _init_dev_i2c(self, vendor, product, serialname, interface):
     """Initalize Linux i2c-dev interface."""
     return i2cbus.I2CBus('/dev/i2c-%d' % interface['bus_num'])
Пример #2
0
 def __init__(self, bus, dev_addr=DEV_ADDR):
     self.bus = bus
     self.dev_addr = dev_addr
     self.i2cbus = i2cbus.I2CBus(bus)
Пример #3
0
 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