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

drivers/periph_timer: fix timer_query_freqs() doc

The code examples in the doc contained an obvious bug that this commit
fixes.
This commit is contained in:
Marian Buschsieweke 2024-11-18 21:27:41 +01:00
parent c636f34eac
commit 04f1597792
No known key found for this signature in database
GPG Key ID: 758BD52517F79C41

View File

@ -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));
* }
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~