mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:32:45 +01:00
cpu/qn909x/periph_timer: make clangd happy
The linter was unhappy that `unsinged long` and `uint32_t` were used inconsistency (in the `timer_init()` declaration, implementation, as well as in the `DEBUG()` format specifiers).
This commit is contained in:
parent
476dca2e8f
commit
c95028655d
@ -66,9 +66,9 @@ static const clock_ip_name_t ctimers_clocks[FSL_FEATURE_SOC_CTIMER_COUNT] =
|
||||
#error "ERROR in board timer configuration: too many timers defined"
|
||||
#endif
|
||||
|
||||
int timer_init(tim_t tim, unsigned long freq, timer_cb_t cb, void *arg)
|
||||
int timer_init(tim_t tim, uint32_t freq, timer_cb_t cb, void *arg)
|
||||
{
|
||||
DEBUG("timer_init(%u, %lu)\n", tim, freq);
|
||||
DEBUG("timer_init(%u, %" PRIu32 ")\n", tim, freq);
|
||||
if (tim >= TIMER_NUMOF) {
|
||||
return -1;
|
||||
}
|
||||
@ -84,7 +84,7 @@ int timer_init(tim_t tim, unsigned long freq, timer_cb_t cb, void *arg)
|
||||
uint32_t core_freq = CLOCK_GetFreq(kCLOCK_ApbClk);
|
||||
uint32_t prescale = (core_freq + freq / 2) / freq - 1;
|
||||
if (prescale == (uint32_t)(-1)) {
|
||||
DEBUG("timer_init: Frequency %lu is too fast for core_freq=%lu",
|
||||
DEBUG("timer_init: Frequency %" PRIu32 " is too fast for core_freq=%" PRIu32,
|
||||
freq, core_freq);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user