summaryrefslogtreecommitdiff
path: root/rcc/SConscript
diff options
context:
space:
mode:
authorKarl Palsson <karlp@tweak.net.au>2021-09-17 22:02:25 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2022-01-26 23:40:29 +0100
commit1b5215b679d541f0902ad1d39f0ceb6c36250401 (patch)
tree56e89b17184d97fc06ed66afcdd6ea1f60b7a37d /rcc/SConscript
parent2d8a1c0489da61996bb4787a53353585d0413a03 (diff)
flash: convert to new style
Diffstat (limited to 'rcc/SConscript')
-rw-r--r--rcc/SConscript18
1 files changed, 18 insertions, 0 deletions
diff --git a/rcc/SConscript b/rcc/SConscript
index f72d4be..a5c82f3 100644
--- a/rcc/SConscript
+++ b/rcc/SConscript
@@ -27,4 +27,22 @@ if 'rcc' in periph:
env.Jinja2('rcc.h', '../templates/periph_instances.h.j2', headers = headers, instances = instances, aliases = aliases)
+
+headers = []
+instances = []
+aliases = {}
+
+if 'stm32_flash' in periph:
+ headers.append('flash_methods.h')
+ headers.append('stm32_flash.h')
+ for name, data in periph['stm32_flash'].items():
+ instances.append({
+ 'type': 'STM32_FLASH_t<STM32_FLASH_reg_%s_t>' % data['type'],
+ 'name': name,
+ 'args': [data['offset']],
+ })
+
+env.Jinja2('flash.h', '../templates/periph_instances.h.j2', headers = headers, instances = instances, aliases = aliases)
+
+
Return('sources')