Configuration Reference

Normative

The configuration items a conformant Port driver MUST support (CHI-PORT-MUST-13). 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, ports, and pins
ConfigSet

Property

Type

Description

config_set_name

str

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

port

List[Port]

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

Port

Property

Type

Description

port_id

int

Physical port id. Range [0, ] (maximum implementation-defined).

port_name

str or null

Optional alias; generates PORT_PORT_<name>. Must be a valid C identifier. null suppresses the alias.

pin

List[Pin]

Per-pin configurations for this port. Size ≥ 1; maximum implementation-defined.

A port may carry additional hardware-dependent, implementation-defined properties.

Pin

Property

Type

Description

pin_id

int

Physical pin id within the port. Range [0, ] (maximum implementation-defined).

pin_name

str or null

Optional alias; generates PORT_PIN_<name>. Must be a valid C identifier. null suppresses the alias.

mode

impl-defined

Pin function mode (e.g. GPIO, PWM, analog, bus alternate function). The available set is hardware-dependent; the tool should offer only the modes the pin supports.

init_value

PinValue

Initial output value: High or Low.

direction

Direction

In | Out | In-Out | Hi-Z.

event_handling_mode

EventHandlingMode

Interrupt or Polling (polled edge events serviced by Port_PollFunction).

Note

mode and direction are applied by Port_Init and are fixed at runtime; only edge detection is settable afterwards (Port_SetEdgeDetection).