device method

  1. @override
I2CDevice device(
  1. int address
)
override

Return the I2CDevice for communicating with the device at address.

Implementation

@override
I2CDevice device(int address) {
  allocateAddress(address);
  var fd = _dylib.setupDevice(address);
  if (fd < 0) throw I2CException('device init failed: $fd');
  final device = RpiI2CDevice(address, fd, _dylib);
  _devices.add(device);
  return device;
}