board_pins: Use an explicit parameter to specify mcu name(s)

Add an 'mcu' option to the board_pins config and use that to specify
the name of the mcu to apply the aliases to.  Support applying the
aliases to multiple mcus.

Add support for any number of options starting with an "aliases_"
prefix.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor
2020-11-20 11:36:36 -05:00
parent 37b475815e
commit bdd938b578
4 changed files with 43 additions and 25 deletions

View File

@@ -1396,19 +1396,23 @@ software dependencies must be installed; refer to
## [board_pins]
Board pin aliases. One may define aliases for the pins on a
micro-controller. (If a micro-controller name is omitted in the
board_pins config section name then it defaults to "mcu".)
Board pin aliases (one may define any number of sections with a
"board_pins" prefix). Use this to define aliases for the pins on a
micro-controller.
```
[board_pins mcu]
[board_pins my_aliases]
mcu: mcu
# A comma separated list of micro-controllers that may use the
# aliases. The default is to apply the aliases to the main "mcu".
aliases:
aliases_<name>:
# A comma separated list of "name=value" aliases to create for the
# given micro-controller. For example, "EXP1_1=PE6" would create an
# "EXP1_1" alias for the "PE6" pin. However, if "value" is enclosed
# in "<>" then "name" is created as a reserved pin (for example,
# "EXP1_9=<GND>" would reserve "EXP1_9"). This parameter must be
# provided.
# "EXP1_9=<GND>" would reserve "EXP1_9"). Any number of options
# starting with "aliases_" may be specified.
```
## [include]