From 8e67ee31ef8f9041087b2897644fd1735e3932a4 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Thu, 7 Dec 2023 14:59:05 +0100 Subject: [PATCH] tests/periph/timer: rename speed --> timer_freq --- tests/periph/timer/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/periph/timer/main.c b/tests/periph/timer/main.c index 4df051db10..a3f189d08e 100644 --- a/tests/periph/timer/main.c +++ b/tests/periph/timer/main.c @@ -73,7 +73,7 @@ static uword_t query_channel_numof(tim_t dev) return TIMER_CHANNEL_NUMOF; } -static int test_timer(unsigned num, uint32_t speed) +static int test_timer(unsigned num, uint32_t timer_freq) { int set = 0; @@ -87,9 +87,9 @@ static int test_timer(unsigned num, uint32_t speed) } printf(" - Calling timer_init(%u, %" PRIu32 ")\n ", - num, speed); + num, timer_freq); /* initialize and halt timer */ - if (timer_init(TIMER_DEV(num), speed, cb, (void *)(COOKIE * num)) != 0) { + if (timer_init(TIMER_DEV(num), timer_freq, cb, (void *)(COOKIE * num)) != 0) { printf("ERROR: timer_init() failed\n\n"); return 0; } @@ -157,9 +157,9 @@ static int test_timer(unsigned num, uint32_t speed) /* test for spurious timer IRQs */ printf(" - Validating no spurious IRQs are triggered:\n"); - expect(0 == timer_init(TIMER_DEV(num), speed, cb_not_to_be_executed, NULL)); + expect(0 == timer_init(TIMER_DEV(num), timer_freq, cb_not_to_be_executed, NULL)); - const unsigned duration = 2ULL * US_PER_MS * US_PER_SEC / speed; + const unsigned duration = 2ULL * US_PER_MS * US_PER_SEC / timer_freq; unsigned target = timer_read(TIMER_DEV(num)) + duration; expect(0 == timer_set_absolute(TIMER_DEV(num), 0, target)); expect(0 == timer_clear(TIMER_DEV(num), 0));