summaryrefslogtreecommitdiff
path: root/pwr/SConscript
diff options
context:
space:
mode:
authorKarl Palsson <karlp@tweak.net.au>2022-01-06 23:19:16 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2022-01-26 23:40:29 +0100
commit1ddf184af5a633903e81ec07093968d8dec086c8 (patch)
tree4463126317f212d2d7387605c9fe3eb3a575648b /pwr/SConscript
parent114eab5a0b5aa3f97ead07edabcfc93ee99b19d2 (diff)
stm32wb: pwr: initial registers
No helpers, just the register map. Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Diffstat (limited to 'pwr/SConscript')
-rw-r--r--pwr/SConscript22
1 files changed, 22 insertions, 0 deletions
diff --git a/pwr/SConscript b/pwr/SConscript
new file mode 100644
index 0000000..d728602
--- /dev/null
+++ b/pwr/SConscript
@@ -0,0 +1,22 @@
+Import('env')
+
+headers = []
+instances = []
+sources = []
+aliases = {}
+
+periph = env['PLATFORM_SPEC'].get('periph', {})
+
+if 'stm32_pwr' in periph:
+ headers.append('stm32_pwr.h')
+ for name, data in periph['stm32_pwr'].items():
+ instances.append({
+ 'type': 'STM32_PWR_t<STM32_PWR_reg_%s_t>' % data['type'],
+ 'name': name,
+ 'args': [data['offset']],
+ })
+
+env.Jinja2('pwr.h', '../templates/periph_instances.h.j2', headers = headers, instances = instances, aliases = aliases)
+
+Return('sources')
+