.enabled Property

Function:

Enables/disables the currently selected I²C channel (selection is made through i2c.channel).

Type:

Enum (no_yes, byte)

Value Range:

  • 0 — NO (default): disabled
  • 1 — YES: enabled

See Also:

---


Details

Setting i2c.enabled automatically configures the selected I²C channel's SCL and SDA lines as inputs, which means they are also pulled HIGH.

After setting i2c.enabled to 1 — YES, the state of the bus becomes idle (i2c.state = 0 — I2C_IDLE).


The selected I²C channel's SCL and SDA lines can only be mapped (via i2c.sclmap and i2c.sdamap, respectively) when the channel is disabled (i2c.enabled = 0 — NO).

You can only read and write data (i2c.read and i2c.write, respectively) when the channel is enabled (i2c.enabled = 1 — YES).


.enabled Property

Details