summaryrefslogtreecommitdiff
path: root/rcc
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2021-09-16 20:25:24 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2021-09-16 20:29:55 +0200
commit3d4225f210c5b9545a3b4433c983d3a4ffa743a7 (patch)
tree57233be3907b70d7c8299653fbaa2bcf59f99604 /rcc
parent4d56457b6939d35307880e41bd6a42fe1799e125 (diff)
rcc: Fix enable register access for devices with multiple registers for the same bus.
Diffstat (limited to 'rcc')
-rw-r--r--rcc/rcc_enums.h.j22
1 files changed, 1 insertions, 1 deletions
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 %}