.state R/O Property
Function: |
Returns the state of the currently selected I²C channel (selection is made through i2c.channel). |
Type: |
Enum (i2c_state, byte) |
Value Range: |
|
See Also: |
--- |
Details
How your application handles clock stretching and arbitration errors will depend on your connected I²C peripherals.
At a minimum, Tibbo recommends setting i2c.enabled to 0 — NO and resetting the peripherals connected to your I²C bus. Once your devices have returned to a working state, you can set i2c.enabled back to 1 — YES to continue working on the bus.
Setting i2c.enabled automatically configures the selected I²C channel's SCL and SDA lines as inputs (and by extension, pulls them HIGH).