From d8d56e5e3a067baca75bd19448f2aafd991a31fc Mon Sep 17 00:00:00 2001 From: chrysn Date: Wed, 23 Sep 2020 10:36:12 +0200 Subject: [PATCH] periph/timer: Document that set_absolute is expected to wrap Most timers are implemented this way already, and keeping (documenting) it that way allows the generic timer_set implementation to stay as simple as it is. --- drivers/include/periph/timer.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/include/periph/timer.h b/drivers/include/periph/timer.h index f52306cbb3..33844f7759 100644 --- a/drivers/include/periph/timer.h +++ b/drivers/include/periph/timer.h @@ -149,6 +149,9 @@ int timer_set(tim_t dev, int channel, unsigned int timeout); /** * @brief Set an absolute timeout value for the given channel of the given timer * + * Timers that are less wide than `unsigned int` accept and truncate overflown + * values. + * * @param[in] dev the timer device to set * @param[in] channel the channel to set * @param[in] value the absolute compare value when the callback will be