From 04f1597792856328665f2583ea8df533a682e6d1 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Mon, 18 Nov 2024 21:27:41 +0100 Subject: [PATCH] drivers/periph_timer: fix timer_query_freqs() doc The code examples in the doc contained an obvious bug that this commit fixes. --- drivers/include/periph/timer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/include/periph/timer.h b/drivers/include/periph/timer.h index 1253cd347a..8a615b857c 100644 --- a/drivers/include/periph/timer.h +++ b/drivers/include/periph/timer.h @@ -281,7 +281,7 @@ uword_t timer_query_channel_numof(tim_t dev); * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c} * uint32_t freq: - * for (uword_t i; (freq = timer_query_freqs(dev, i)); i++) { + * for (uword_t i = 0; (freq = timer_query_freqs(dev, i)); i++) { * work_with_frequency(freq); * } * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -289,7 +289,7 @@ uword_t timer_query_channel_numof(tim_t dev); * Or alternatively: * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~{.c} - * for (uword_t i; i < timer_query_freqs_numof(dev); i++) { + * for (uword_t i = 0; i < timer_query_freqs_numof(dev); i++) { * work_with_frequency(timer_query_freqs(dev, i)); * } * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~