I2C#

I2C bus communication devices.

Instrument and Abstract Driver#

I2CInterface

I2C interface supporting register-based and command-based devices.

I2CDriverBase

Vendor I2C-adapter driver contract.

Vendor Drivers#

Vendor

Model

Description

Total Phase

Aardvark

Total Phase Aardvark I2C/SPI host adapter.

Types & Configuration#

SystemDefinition

Top-level container of all I2C device definitions, passed to I2CInterface.

RegisterDevice

Register-based I2C device (e.g. a GPIO expander).

CommandDevice

Command-based I2C device (e.g. an ADC).

RegisterDef

I2C register: address, data format, power-on default, byte order, and named bit fields.

CommandDef

A named command enum whose members are OR'd together when sent.

FieldDef

A contiguous bit field within a register (e.g. FieldDef("mode", lsb=3, width_bits=2) for bits [4:3]).

DataFormat

How to extract logical data from an I2C transfer and convert to physical units.

ScalingFunction

Convert between raw register integers and physical units (forward and inverse).

LinearScaling

Linear scaling: physical = offset + gain * raw.

CustomScaling

User-defined scaling.


Errors raised by these methods are documented in Exceptions.