Skip to content

Figures

Every figure on this site is drawn by a Python module from facts extracted from the code, so it is rebuilt, not redrawn, when the code changes. CI runs hardfoc-docs figures --check and fails when a committed figure no longer matches the code. Each figure below lists the files it is drawn from.

One row per pin, every table generated

Flow diagram: the HAL build defines one HARDFOC_BOARD macro, the selector header includes that board's header, whose X-macro lists expand into the pin enums, name and category tables and mapping arrays, which the board HAL's GPIO and ADC managers read.Flow diagram: the HAL build defines one HARDFOC_BOARD macro, the selector header includes that board's header, whose X-macro lists expand into the pin enums, name and category tables and mapping arrays, which the board HAL's GPIO and ADC managers read.
One row per pin, every table generated
Figure description and sources

From top to bottom. The HAL's build defines one HARDFOC_BOARD_* macro; the selector header (src/hf_functional_pin_config.hpp) includes that board's header. The board header holds two X-macro lists, one row per GPIO function and one per ADC channel. Expanding the lists produces the enums, name and category tables and the mapping arrays (names read from the Vortex V1 header). The board HAL's managers iterate the mapping arrays and look pins up by enum; no other code writes a pin number.

Drawn from: src/hf_functional_pin_config.hpp board selector; src/hf_functional_pin_config_vortex_v1.hpp X-macro lists and generated tables; figure module docs/diagrams/figures/pin-model.py.

Figure module: docs/diagrams/figures/pin-model.py

Drawn from: