Configuration Reference

Normative

The configuration items a conformant I2C driver MUST support (CHI-I2C-MUST-23). The configuration toolchain, data structure, and file schema are implementation-defined; vendor extensions are allowed. For a worked example see Configuration. The model follows the common configuration structure in the General part.

General
General options

Property

Type

Description

enable_development_error_reporting

bool

If true, development error checking and reporting is enabled (see Errors).

Configuration set and channels
ConfigSet

Property

Type

Description

config_set_name

str

Name of the configuration set; must be a valid C identifier.

channel

List[ControllerChannel | TargetChannel]

Per-channel configurations. Size ≥ 1; maximum is implementation-defined.

ControllerChannel

Property

Type

Description

node_type

Literal[‘Controller’]

Marks the channel as a controller.

channel_id

int

Logical channel id. Starts at 0, unique within a ConfigSet.

hw_channel

impl-defined

Hardware channel assigned to this logical channel.

event_handling_mode

EventHandlingMode

Interrupt or Polling (polled events serviced by I2c_PollFunction).

clock_divider

int

I2C hardware clock divider; derives the SCL bitrate. Range ≥ 1 (maximum implementation-defined).

TargetChannel

Property

Type

Description

node_type

Literal[‘Target’]

Marks the channel as a target.

channel_id

int

Logical channel id. Starts at 0, unique within a ConfigSet.

hw_channel

impl-defined

Hardware channel assigned to this logical channel.

event_handling_mode

EventHandlingMode

Interrupt or Polling.

device_address

int

This target’s 7-bit address. Range [0, 127].

default_data

int

Byte transmitted when the controller over-reads and no TX buffer is staged. Range [0, 255].

Note

Controller channels carry clock_divider; target channels carry device_address and default_data. There is no standard/fast-mode enum — the bitrate is expressed only through clock_divider.