summaryrefslogtreecommitdiff
path: root/exti/SConscript
blob: b6208186fa218b1fbf9c17e4dd87d6c56dc4e000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Import('env')

headers = []
instances = []
sources = []
aliases = {}

periph = env['PLATFORM_SPEC'].get('periph', {})

if 'stm32_exti' in periph:
    headers.append('stm32_exti.h')
    for name, data in periph['stm32_exti'].items():
        instances.append({
            'type': 'STM32_EXTI_t<STM32_EXTI_reg_%s_t>' % data['type'],
            'name': name,
            'args': [data['offset']],
        })

env.Jinja2('exti.h', '../templates/periph_instances.h.j2', headers = headers, instances = instances, aliases = aliases)

Return('sources')