Package i2c defines interface to an I²C bus and an I²C device.
It includes the adapter Dev to directly address an I²C device on a I²C bus without having to continuously specify the address when doing I/O. This enables the support of conn.Conn.
Bus defines the interface a concrete I²C driver must implement.
This interface is consummed by a device driver for a device sitting on a bus.
This interface doesn't implement conn.Conn since a device address must be specified. Use i2cdev.Dev as an adapter to get a conn.Conn compatible object.
BusCloser is an I²C bus that can be closed.
This interface is meant to be handled by the application and not the device driver. A device driver doesn't "own" a bus, hence it must operate on a Bus, not a BusCloser.
Dev is a device on a I²C bus.
It implements conn.Conn.
It saves from repeatedly specifying the device address.
Tx does a transaction by adding the device's address to each command.
It's a wrapper for Bus.Tx().
Pins defines the pins that an I²C bus interconnect is using on the host.
It is expected that a implementer of Bus also implement Pins but this is not a requirement.
Package i2creg defines I²C bus registry to list buses present on the host.
|Package i2creg defines I²C bus registry to list buses present on the host.|
Package i2csmoketest is leveraged by periph-smoketest to verify that an I²C EEPROM device and a DS2483 device can be accessed on an I²C bus.
|Package i2csmoketest is leveraged by periph-smoketest to verify that an I²C EEPROM device and a DS2483 device can be accessed on an I²C bus.|
Package i2ctest is meant to be used to test drivers over a fake I²C bus.
|Package i2ctest is meant to be used to test drivers over a fake I²C bus.|