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

headers = []
instances = []

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

if 'dwc_otg' in periph:
    headers.append('dwc_otg.h')
    for name, data in periph['dwc_otg'].items():
        instances.append({
            'type': 'DWC_OTG_t',
            'name': name,
            'args': [data['offset']],
        })

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

Return()