1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-30 17:01:19 +01:00
Marian Buschsieweke 7c0a4b8390
cpu/stm32/periph_timer: Support timers with channels != 4
The assumption that all STM32 timers have exactly four channels no
longer holds. E.g. the STM32L4 has the following general purpose timers:

- TIM2: 32 bit, 4 channels
- TIM15: 16 bit, 2 channels
- TIM16: 16 bit, 1 channel

Hence, a new field is added to the timer configuration to also contain
the number of timer channels. Due to alignment the `struct` previously
was padded by 16 bit, so adding another 8 bit field doesn't increase
its size.

For backward compatibility, a value of `0` is considered as alias for
`TIMER_CHANNEL_NUMOF` (or 4), so that the number of timer channels
only needs to be set when the timer is different from the typical 4
channel timer. This helps backward compatibility.
2023-05-30 12:55:29 +02:00
..
2023-01-08 22:26:12 +01:00
2023-01-08 22:26:12 +01:00
2023-05-20 15:42:00 +00:00
2023-01-08 22:26:12 +01:00
2023-01-08 22:26:12 +01:00
2023-01-08 22:26:12 +01:00
2023-05-02 18:08:42 +00:00
2023-01-08 22:26:12 +01:00
2023-01-08 22:26:12 +01:00
2023-05-24 09:53:23 +02:00
2023-01-08 22:26:12 +01:00
2021-07-09 10:47:42 +02:00