diff options
author | Karl Palsson <karlp@etactica.com> | 2021-09-20 13:23:29 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2022-01-26 23:40:29 +0100 |
commit | 24507af1a99f66ded76e8796de5bae35c7c0b567 (patch) | |
tree | 17ee7d7df7b7dbb8fe3ffdaa504b5107a1f27ce4 /rcc | |
parent | 760a7f3526450e94409cbcb6a749070b0e879fce (diff) |
stm32_rcc: allow aliases for enables.
By flipping the name/number definition, we can define aliases such as
ADC and ADC1, or FMC/FSMC for the same bits, making it easier to have
code that both matches reference manuals, and also code that matches
between lines.
runtime tested on WB, compile tested on F3.
Signed-off-by: Karl Palsson <karlp@etactica.com>
Diffstat (limited to 'rcc')
-rw-r--r-- | rcc/rcc_enums.h.j2 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rcc/rcc_enums.h.j2 b/rcc/rcc_enums.h.j2 index 97e85b9..a4965b0 100644 --- a/rcc/rcc_enums.h.j2 +++ b/rcc/rcc_enums.h.j2 @@ -5,7 +5,7 @@ namespace rcc { {% for bus, devices in buses.items() %} enum {{ bus }}_dev { - {% for num, name in devices.items() %} + {% for name, num in devices.items() %} {{ name }} = 1 << {{ num }}, {% endfor %} }; |