1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

12 Commits

Author SHA1 Message Date
Martine Lenders
dd969745ab
ztimer/ztimer64: uncrustify code 2023-03-15 15:13:48 +01:00
Juergen Fitschen
90b2f3158c ztimer/convert: pass-thru start/stop ops to lower timer 2022-11-22 00:25:34 +01:00
Jue
9fbb4d3391 ztimer/convert: only extend the clocks if ztimer_ondemand isn't used 2022-11-22 00:25:34 +01:00
Jue
904dc0131f ztimer: don't interact with pm_layered if ztimer_ondemand is used 2022-11-02 22:36:54 +01:00
Karl Fessel
a6a53c98f7 sys/ztimer: convert clock do not require pm
avoid blocking and unblocking of power_mode 0 for convert clocks
2021-06-21 13:56:03 +02:00
Martine Lenders
7e3846b6a4
ztimer: apply uncrustify patches 2021-02-02 22:21:15 +01:00
7fe0d5cba8 sys/ztimer: add missing inttypes.h includes 2020-11-26 13:43:13 +01:00
Bas Stottelaar
1b35d06a51 sys/*: realign ENABLE_DEBUG 2020-10-23 11:27:48 +02:00
1ff609167e ztimer: convert_frac: use self->scale_now for max_value
When using convert_frac to slow down a timer, the extension machinery is
used to prevent converting values that would be larger than, after
conversion, 2**32. In order to calculate the maximum value, UINT32_MAX
is converted.

Previously, this was mistakenly converted by multiplying with the
fraction used to scale up a value. E.g., when using convert_frac to
slow down a 1us timer to provide a 1ms timer, UINT32_MAX was multiplied
by 1000. As the result is used % UINT32_MAX, this lead to a wrong value
close to UINT32_MAX, as ((UINT32_MAX * N) % UINT32_MAX = (UINT32_MAX - N - 1)).

This PR fixes the calculation so max_value is determined by multiplying
with the fraction used to scale down a value.
2020-06-16 12:24:11 +02:00
ba9afe98c3 sys/ztimer: uncrustify 2020-05-11 16:43:50 +02:00
fc68d9c3a3 sys/ztimer: properly initialize intermediate extension callback 2020-05-04 17:25:27 +02:00
6dd79366bb sys: add ztimer subsystem
Co-authored-by: Joakim Nohlgård <joakim.nohlgard@eistec.se>
2020-03-04 12:44:02 +01:00