Expand description
The stable diagnostic codes, one per message.
The ranges are reserved by stage (see the crate docs). Keeping the map in
one place is what stops two stages from picking the same number: a new
message gets a new entry here, and for_message is the only producer of
a code for the EspfError shim.
Codes are data: the human renderer does not print them, to_json does.
Once a code has shipped it is a public contract, so never renumber one for
a different message.
Constants§
- CLI_
ANSWER - A command-line answer that cannot be applied (no source span).
- COMPONENT_
I2C_ BUS_ USED - Two
<i2c_component>s on one<i2c>. - COMPONENT_
INVALID_ BAUD <uart_component baud_rate="0">.- COMPONENT_
INVALID_ BUTTON - A
<button>that cannot be built. - COMPONENT_
INVALID_ CS - A chip-select attribute that is neither a pin nor a gpio id.
- COMPONENT_
INVALID_ I2C - An
<i2c_component>that cannot be built. - COMPONENT_
INVALID_ ID - A component id that cannot become a Rust identifier.
- COMPONENT_
INVALID_ LED - An
<led>that cannot be built. - COMPONENT_
INVALID_ SPI - An
<spi_component>that cannot be built. - COMPONENT_
INVALID_ UART - A
<uart_component>that cannot be built. - COMPONENT_
UART_ USED - Two
<uart_component>s on one<uart>. - COMPONENT_
UNKNOWN_ BUS - A component pointing at a bus that is not a bus of that kind.
- COMPONENT_
UNKNOWN_ GPIO - A
<led>/<button>referencing a gpio id that does not exist. - COMPONENT_
UNSUPPORTED - A component tag
builddoes not lower yet. - COMPONENT_
WRONG_ DIRECTION - A led on an input pin or a button on an output pin.
- CONFLICT_
DIRECTION - One element needs an input and the other an output.
- CONFLICT_
I2C_ WIRING - An
<i2c>bus whose SDA and SCL are the same pin. - CONFLICT_
PERIPHERAL - Two elements on one
<uart>peripheral. - CONFLICT_
PIN - Two elements on one pin.
- CONFLICT_
PIN_ USED - A pin claimed by two elements of the same kind.
- CONFLICT_
SPI_ WIRING - An
<spi>bus whose SCLK and MOSI are the same pin. - CONFLICT_
UART_ WIRING - A
<uart>whose TX and RX are the same pin. - CORE_
CHIP_ WITHOUT_ TYPE <chip>without atypeattribute.- CORE_
CONSOLE_ WITHOUT_ TYPE <console>without atypeattribute.- CORE_
DUPLICATE_ ELEMENT - The same element is written twice in
# espforge. - CORE_
INCOMPLETE # espforgelacks<project>,<chip>or<runtime>.- CORE_
RUNTIME_ WITHOUT_ TYPE <runtime>without atypeattribute.- CORE_
UNKNOWN_ CHIP - A chip name the catalog does not know.
- CORE_
UNKNOWN_ CONSOLE - A console name the catalog does not know.
- CORE_
UNKNOWN_ ELEMENT - An element the
# espforgeschema does not know. - CORE_
UNKNOWN_ RUNTIME - A runtime name the catalog does not know.
- DRIVER_
UNKNOWN - A device tag with no compile-time driver.
- GPIO_
INVALID_ DIRECTION <gpio direction>outsideinput/output.- GPIO_
INVALID_ PIN <gpio pin>that is not a number.- GRAPH_
COMPONENT_ WITHOUT_ ID - A component without an id.
- GRAPH_
COMPONENT_ WITHOUT_ LINK - A component without its
i2c=/spi=/gpio=/uart=link. - GRAPH_
DEVICE_ WITHOUT_ ID - A device without an id.
- GRAPH_
DEVICE_ WITHOUT_ MAPPING - A device without its component mapping.
- GRAPH_
INVALID_ PIN - A pin attribute that is not a 0..=255 number.
- GRAPH_
PERIPHERAL_ WITHOUT_ ID - A peripheral without an id.
- GRAPH_
UNKNOWN_ COMPONENT - A
$reference to a component id that does not exist. - GRAPH_
UNKNOWN_ PERIPHERAL - A
$reference to a peripheral id that does not exist. - I2C_
INVALID_ FREQUENCY - An
<i2c frequency>that is notNkHz. - I2C_
INVALID_ ID - An
<i2c>id other than i2c0..i2c2. - I2C_
INVALID_ PIN - An
<i2c>pin that is not a number. - OPTION_
DERIVED - An option value that cannot be set in
<options>. - OPTION_
INVALID_ VALUE - An option value outside its declared choices.
- OPTION_
MUTUALLY_ EXCLUSIVE - Two options in one selection group are on together.
- OPTION_
NO_ CONSOLE - The selected console does not exist on the chip.
- OPTION_
REQUIRES - An option that needs another option that is off.
- OPTION_
UNAVAILABLE - An option that the selected chip cannot provide.
- OPTION_
UNKNOWN - An option name that is not in the schema.
- PERIPHERAL_
UNSUPPORTED - A peripheral tag
builddoes not lower yet. - SERVICE_
DUPLICATE_ WIFI - A second
<wifi>in# services. - SERVICE_
INVALID_ PASSWORD - A password that is neither empty nor 8..=63 characters.
- SERVICE_
INVALID_ SSID - An ssid outside 1..=32 bytes.
- SERVICE_
INVALID_ VALUE - A wifi value that cannot be a Rust string literal.
- SERVICE_
MISSING_ SSID <wifi>without an ssid.- SERVICE_
UNSUPPORTED - A service other than
<wifi>. - SERVICE_
UNSUPPORTED_ DEVICES # devicesentries are not lowered yet.- SERVICE_
UNSUPPORTED_ FIELD - A
<wifi>field other than network1.ssid/password. - SPI_
INVALID_ FREQUENCY - An
<spi frequency>that is notNkHz. - SPI_
INVALID_ ID - An
<spi>id other than spi2. - SPI_
INVALID_ MODE - An
<spi mode>outside 0..=3. - SPI_
INVALID_ PIN - An
<spi>pin that is not a number. - STRUCTURE_
DUPLICATE_ SECTION - Two
# sectionblocks with the same name. - STRUCTURE_
MISSING_ SECTION - A required
# sectionblock is absent. - SYNTAX_
NODE_ LINE - A parser-junk line that is not a node.
- SYNTAX_
SECTION_ HEADER - A line that should have been a
# sectionheader. - UART_
INVALID_ ID - A
<uart>id other than uart0..uart3. - UART_
INVALID_ PERIPHERAL - An explicit
<uart uart>outside UART0..UART3. - UART_
INVALID_ PIN - A
<uart>pin that is not a number. - UNCLASSIFIED
- The fallback for a message the table does not know.
- VALUE_
KEY_ KIND - A key used both as a plain value and as an object.
- VALUE_
MISSING_ ATTRIBUTE - A required attribute is absent.
- VALUE_
NOT_ BOOLEAN - A value that should be a boolean.
- VALUE_
NOT_ NUMBER - A value that should be an unsigned number.
- VALUE_
WRONG_ TYPE - An attribute value with the wrong type.
Functions§
- for_
cli_ message - The code for a command-line answer that never enters the source pipeline.
- for_
message - The code for one diagnostic message.