Files
micropython/tools
Alessandro Gatti ca85a1eb23 tools/boardgen.py: Make per-pin content output extensible.
This commit lets classes extending the base `PinGenerator` class to
override the process of generating extra per-pin content when creating
the pins' information source file.

There are cases in which one may want to have more control on the part
of the source generation process that dumps additional per-pin
information to the source file.  The current approach works fine if each
pin generates self-contained additional data to be placed in the source
file, but there is no clean way to provide a prologue or an epilogue to
that content.

For example, if one wants to emit a single consolidated additional pin
data table it is not that convenient to be able to consistently emit the
table start definition and the table end markers.  With these changes
all one has to do to achieve this is to override
`PinGenerator.print_pin_source` in their PinGenerator-derived class
to either wrap the output or to replace what is being output altogether.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-04-30 23:32:40 +10:00
..
2024-03-07 16:25:17 +11:00