i2c module API docs

The pumpkin_supmcu.i2c module contains definitions for creating I2CMaster devices, with a universal I2C Protocol. The pumpkin_supmcu.i2c module contains an implementations of the I2CMaster for the following devices:

Users can create (and possibly contribute) additional I2CMaster implementations of other I2C Bus Adaptors.

i2c.master module API docs

The I2CMaster Protocol is for creating I2C Bus Master implementations such as the I2CDriverMaster. Any implementation of the I2CMaster can be used with functions/classes defined in the supmcu module.

class pumpkin_supmcu.i2c.I2CBusSpeed(value)

The possible I2C Bus speeds that are supported by the I2CMaster Protocol.

Fast = 400

400 kHz bus speed

Standard = 100

100 kHz bus speed

class pumpkin_supmcu.i2c.I2CMaster

The Protocol to use for implementing a I2C Master device such as the I2CDriver or the Aardvark. Note the package

abstract property device_name: str

Returns the name of the I2C Master device.

Return type

str

abstract property device_pullups: bool

Returns if the I2C pullups are ON or OFF.

Return type

bool

abstract property device_speed: pumpkin_supmcu.i2c.master.I2CBusSpeed

Returns the I2C bus speed currently used.

Return type

I2CBusSpeed

abstract get_bus_devices()

Gets the available I2C devices on the bus

Return type

Iterable[int]

abstract read(addr, amount)

Reads amount bytes from the I2C address addr.

Return type

bytes

abstract write(addr, b)

Writes the bytes b to the I2C address addr.