Configuration Reference
Normative
The configuration items a conformant SPI driver MUST support (CHI-SPI-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
Property |
Type |
Description |
|---|---|---|
|
bool |
If true, development error checking and reporting is enabled (see Errors). |
Configuration set and channels
Property |
Type |
Description |
|---|---|---|
|
str |
Name of the configuration set; must be a valid C identifier. |
|
List[ControllerChannel | TargetChannel] |
Per-channel configurations. Size ≥ 1; maximum is implementation-defined. |
Property |
Type |
Description |
|---|---|---|
|
Literal[‘Controller’] |
Marks the channel as a controller. |
|
int |
Logical channel id. Starts at 0, unique within a ConfigSet. |
|
impl-defined |
Hardware channel assigned to this logical channel. |
|
EventHandlingMode |
|
|
int |
Bits per transfer element. Range |
|
BitOrder |
|
|
int |
Data sent when a TX buffer pointer is null. Range |
|
int |
SPI hardware clock divider; derives the bitrate. Range ≥ 1 (maximum implementation-defined). |
|
CsControl |
Chip-select control: |
|
List[ControllerDeviceConfig] |
External SPI devices on this channel (one per chip select). Size ≥ 1. |
Property |
Type |
Description |
|---|---|---|
|
int |
Hardware chip-select id. Range |
|
CsPolarity |
|
|
DataShiftEdge |
Data shift clock edge: |
|
ShiftClockIdleLevel |
|
|
int |
Logical chip-select id used in the API |
Property |
Type |
Description |
|---|---|---|
|
Literal[‘Target’] |
Marks the channel as a target. |
|
int |
Logical channel id. Starts at 0, unique within a ConfigSet. |
|
impl-defined |
Hardware channel assigned to this logical channel. |
|
EventHandlingMode |
|
|
int |
Bits per transfer element. Range |
|
BitOrder |
|
|
int |
Data sent when no TX buffer is staged. Range |
|
TargetDeviceConfig |
This target’s external device configuration. |
Property |
Type |
Description |
|---|---|---|
|
int |
Hardware chip-select id. Range |
|
CsPolarity |
|
|
DataShiftEdge |
Data shift clock edge: |
|
ShiftClockIdleLevel |
|
Note
Controller channels carry clock_divider, cs_ctrl, and a list of device_config
(one per chip select, each with a cs_logical_id). Target channels carry a single
device_config and no cs_ctrl — the target does not drive the chip select.