summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platforms/stm32/wb.yaml2
-rw-r--r--rcc/rcc_enums.h.j22
2 files changed, 2 insertions, 2 deletions
diff --git a/platforms/stm32/wb.yaml b/platforms/stm32/wb.yaml
index 4277085..c41148c 100644
--- a/platforms/stm32/wb.yaml
+++ b/platforms/stm32/wb.yaml
@@ -64,7 +64,7 @@
25: FLASH
7: OTGFS
- APB1:
+ APB1_1:
0: TIM2
9: LCD
10: RTCAPB
diff --git a/rcc/rcc_enums.h.j2 b/rcc/rcc_enums.h.j2
index 1b0abd0..97e85b9 100644
--- a/rcc/rcc_enums.h.j2
+++ b/rcc/rcc_enums.h.j2
@@ -12,7 +12,7 @@ namespace rcc {
template <typename T>
void enable(const T& rcc, {{ bus }}_dev dev) {
- rcc->{{ bus }}ENR |= dev;
+ rcc->{{ bus.split('_')[0] }}ENR{{ bus.split('_')[1] if '_' in bus else '' }} |= dev;
}
{% endfor %}