summaryrefslogtreecommitdiff
path: root/timer/SConscript
diff options
context:
space:
mode:
authorKarl Palsson <karlp@etactica.com>2021-09-15 16:45:29 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2021-09-16 20:29:55 +0200
commit41d7823059a9e81a8cf6ec7ed65eba6959b39ee4 (patch)
tree00c64540d38824fa4d5f130a7b14a2712eb208a1 /timer/SConscript
parent891344a7f602e9431a52b89d32d3b5a8e2b0430c (diff)
timer: convert to new style and add WB
Stub f1 and f3 platform files have been added to preserve the collected timer base addresses, even though those platforms aren't actually supported in laks yet. Signed-off-by: Karl Palsson <karlp@etactica.com>
Diffstat (limited to 'timer/SConscript')
-rw-r--r--timer/SConscript21
1 files changed, 21 insertions, 0 deletions
diff --git a/timer/SConscript b/timer/SConscript
new file mode 100644
index 0000000..7f5afbc
--- /dev/null
+++ b/timer/SConscript
@@ -0,0 +1,21 @@
+Import('env')
+
+headers = []
+instances = []
+sources = []
+aliases = {}
+
+periph = env['PLATFORM_SPEC'].get('periph', {})
+
+if 'stm32_timer' in periph:
+ headers.append('stm32_timer.h')
+ for name, data in periph['stm32_timer'].items():
+ instances.append({
+ 'type': 'STM32_TIMER_t<STM32_TIMER_reg_%s_t>' % data['type'],
+ 'name': name,
+ 'args': [data['offset']],
+ })
+
+env.Jinja2('timer.h', '../templates/periph_instances.h.j2', headers = headers, instances = instances, aliases = aliases)
+
+Return('sources')