1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-16 18:13:49 +01:00

5 Commits

Author SHA1 Message Date
Marian Buschsieweke
5b600d3a8e
drivers/periph_timer: add timer_get_closest_freq
Add an API to search for the frequency supported by a timer that
is closest to the given target frequency.

This is in fact non-trivial to get right, as pre-scaler registers can
be 16 bit or even 32 bit in size, making a naive loop over all possible
pre-scalers too expensive (computationally).

Co-authored-by: mguetschow <mikolai.guetschow@tu-dresden.de>
2025-04-02 16:21:07 +02:00
Marian Buschsieweke
b917807444
drivers/periph_timer: add periph_timer_query_freqs
Allow accessing supported timer frequencies with a dedicated API.
This API needs to be implemented per platform and is available with
the feature periph_timer_query_freqs.
2023-12-05 16:07:24 +01:00
Michel Rottleuthner
8e7a1edd11 drivers/periph_common/timer: protect timer_set from IRQs 2020-01-10 09:58:18 +01:00
Alexandre Abadie
d6eddde5e1 drivers/periph: fix doxygen groups in implementation 2018-05-24 09:11:43 +02:00
Hauke Petersen
a1499f4190 cpu: add and use shared code for timer_set() 2017-06-02 12:21:56 +02:00