summaryrefslogtreecommitdiff
path: root/dma/SConscript
diff options
context:
space:
mode:
authorKarl Palsson <karlp@etactica.com>2021-09-15 17:05:36 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2021-09-16 20:29:55 +0200
commit891344a7f602e9431a52b89d32d3b5a8e2b0430c (patch)
tree6a125fe4a059b7806d089b5f63531679434f0e56 /dma/SConscript
parentd68a78807e7708c480b2fc9d34e1873714423aae (diff)
dma: convert to new style, add DMAMUX
DMAMUX is a channel/source muxer available on L4+,L5,H7,G0,G4,WB and WL parts. Signed-of-by: Karl Palsson <karlp@etactica.com>
Diffstat (limited to 'dma/SConscript')
-rw-r--r--dma/SConscript29
1 files changed, 29 insertions, 0 deletions
diff --git a/dma/SConscript b/dma/SConscript
new file mode 100644
index 0000000..2ee2444
--- /dev/null
+++ b/dma/SConscript
@@ -0,0 +1,29 @@
+Import('env')
+
+headers = []
+instances = []
+sources = []
+aliases = {}
+
+periph = env['PLATFORM_SPEC'].get('periph', {})
+
+if 'stm32_dmamux' in periph:
+ headers.append('stm32_dmamux.h')
+ for name, data in periph['stm32_dmamux'].items():
+ instances.append({
+ 'type': 'STM32_DMAMUX_t<STM32_DMAMUX_reg_%s_t>' % data['type'],
+ 'name': name,
+ 'args': [data['offset']],
+ })
+if 'stm32_dma' in periph:
+ headers.append('stm32_dma.h')
+ for name, data in periph['stm32_dma'].items():
+ instances.append({
+ 'type': 'STM32_DMA_t<STM32_DMA_reg_%s_t>' % data['type'],
+ 'name': name,
+ 'args': [data['offset']],
+ })
+env.Jinja2('dma.h', '../templates/periph_instances.h.j2', headers = headers, instances = instances, aliases = aliases)
+
+
+Return('sources') \ No newline at end of file