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:
The I2CDriver Board as
pumpkin_supmcu.i2cdriver.I2CDriverMaster
.Linux’s /dev/i2c-# interface as
pumpkin_supmcu.linux.I2CLinuxMaster
(Coming soon) Total Phase Aardvark Adaptor as I2CAardvarkMaster.
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_speed: pumpkin_supmcu.i2c.master.I2CBusSpeed¶
Returns the I2C bus speed currently used.
- Return type
- abstract write(addr, b)¶
Writes the bytes b to the I2C address addr.