blob: 190bacb352595fa2e5e020346de89ed3944fd384 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
Import('env')
headers = []
instances = []
sources = []
aliases = {}
periph = env['PLATFORM_SPEC'].get('periph', {})
if 'stm32_syscfg' in periph:
headers.append('stm32_syscfg.h')
for name, data in periph['stm32_syscfg'].items():
# allow overrides, but default to family for syscfg, it's a little special
ptype = data.get('type', env['PLATFORM_SPEC']['meta']['family'])
instances.append({
'type': 'STM32_SYSCFG_t<STM32_SYSCFG_reg_%s_t>' % ptype,
'name': name,
'args': [data['offset']],
})
env.Jinja2('syscfg.h', '../templates/periph_instances.h.j2', headers = headers, instances = instances, aliases = aliases)
Return('sources')
|