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 | |
| 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>
| -rw-r--r-- | platforms/stm32/f1.yaml | 8 | ||||
| -rw-r--r-- | platforms/stm32/f3.yaml | 8 | ||||
| -rw-r--r-- | platforms/stm32/f4.yaml | 8 | ||||
| -rw-r--r-- | platforms/stm32/wb.yaml | 4 | ||||
| -rw-r--r-- | timer/SConscript | 4 | 
5 files changed, 3 insertions, 29 deletions
diff --git a/platforms/stm32/f1.yaml b/platforms/stm32/f1.yaml index 8d4962b..ed97844 100644 --- a/platforms/stm32/f1.yaml +++ b/platforms/stm32/f1.yaml @@ -2,26 +2,18 @@  - periph:      stm32_timer:        TIM1: -        type: v1          offset: 0x40012c00        TIM2: -        type: v1          offset: 0x40000000        TIM3: -        type: v1          offset: 0x40000400        TIM4: -        type: v1          offset: 0x40000800        TIM5: -        type: v1          offset: 0x40000c00        TIM6: -        type: v1          offset: 0x40001000        TIM7: -        type: v1          offset: 0x40001400        TIM8: -        type: v1          offset: 0x40013400 diff --git a/platforms/stm32/f3.yaml b/platforms/stm32/f3.yaml index 8d4962b..ed97844 100644 --- a/platforms/stm32/f3.yaml +++ b/platforms/stm32/f3.yaml @@ -2,26 +2,18 @@  - periph:      stm32_timer:        TIM1: -        type: v1          offset: 0x40012c00        TIM2: -        type: v1          offset: 0x40000000        TIM3: -        type: v1          offset: 0x40000400        TIM4: -        type: v1          offset: 0x40000800        TIM5: -        type: v1          offset: 0x40000c00        TIM6: -        type: v1          offset: 0x40001000        TIM7: -        type: v1          offset: 0x40001400        TIM8: -        type: v1          offset: 0x40013400 diff --git a/platforms/stm32/f4.yaml b/platforms/stm32/f4.yaml index 96731e4..d362fa4 100644 --- a/platforms/stm32/f4.yaml +++ b/platforms/stm32/f4.yaml @@ -32,28 +32,20 @@      stm32_timer:        TIM1: -        type: v1          offset: 0x40010000        TIM2: -        type: v1          offset: 0x40000000        TIM3: -        type: v1          offset: 0x40000400        TIM4: -        type: v1          offset: 0x40000800        TIM5: -        type: v1          offset: 0x40000c00        TIM6: -        type: v1          offset: 0x40001000        TIM7: -        type: v1          offset: 0x40001400        TIM8: -        type: v1          offset: 0x40010400      stm32_uart: diff --git a/platforms/stm32/wb.yaml b/platforms/stm32/wb.yaml index 65eafea..6aee549 100644 --- a/platforms/stm32/wb.yaml +++ b/platforms/stm32/wb.yaml @@ -30,16 +30,12 @@    periph:      stm32_timer:        TIM1: -        type: v1          offset: 0x40012C00        TIM2: -        type: v1          offset: 0x40000000        TIM16: -        type: v1          offset: 0x40014400        TIM17: -        type: v1          offset: 0x40014800      stm32_uart: 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']],          })  | 
