diff options
author | Karl Palsson <karlp@etactica.com> | 2021-09-16 16:02:22 +0200 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2021-09-16 20:29:55 +0200 |
commit | d5beba45db3f11a91bb10f6f7a76d218e83fc03d (patch) | |
tree | 08d0b64c5c897e1ae673ccdff8b84d32c1c14452 /timer | |
parent | 0a520884a475c99c61cd891f10189b5222aeb1a5 (diff) |
timer: stm32: default to v1
"All" parts so far have the v1 timer api, so default to that, but allow
overriding, instead of requiring it to be specified every time.
Signed-off-by: Karl Palsson <karlp@etactica.com>
Diffstat (limited to 'timer')
-rw-r--r-- | timer/SConscript | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/timer/SConscript b/timer/SConscript index 7f5afbc..1490575 100644 --- a/timer/SConscript +++ b/timer/SConscript @@ -10,8 +10,10 @@ periph = env['PLATFORM_SPEC'].get('periph', {}) if 'stm32_timer' in periph: headers.append('stm32_timer.h') for name, data in periph['stm32_timer'].items(): + # ~everyone so far has v1 timers, don't require it until we need it + real_type = data.get('type', 'v1') instances.append({ - 'type': 'STM32_TIMER_t<STM32_TIMER_reg_%s_t>' % data['type'], + 'type': 'STM32_TIMER_t<STM32_TIMER_reg_%s_t>' % real_type, 'name': name, 'args': [data['offset']], }) |