From 61334c3034db26a3f49f1c322b1ccc08e0ad5c9e Mon Sep 17 00:00:00 2001 From: Juergen Fitschen Date: Fri, 6 Mar 2020 13:59:10 +0100 Subject: [PATCH] ztimer: fix RTT backend --- sys/ztimer/auto_init.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/ztimer/auto_init.c b/sys/ztimer/auto_init.c index a13ea3c62d..0c1f6f3d31 100644 --- a/sys/ztimer/auto_init.c +++ b/sys/ztimer/auto_init.c @@ -105,12 +105,12 @@ ztimer_clock_t *const ZTIMER_USEC = &_ztimer_convert_frac_usec.super.super; #endif #if MODULE_ZTIMER_MSEC -# if MODULE_PERIPH_TIMER_RTT -static ztimer_periph_timer_rtt_t _ztimer_periph_timer_rtt_msec; +# if MODULE_PERIPH_RTT +static ztimer_periph_rtt_t _ztimer_periph_timer_rtt_msec; # define ZTIMER_RTT_INIT (&_ztimer_periph_timer_rtt_msec) # if RTT_FREQUENCY!=FREQ_1MHZ static ztimer_convert_frac_t _ztimer_convert_frac_msec; -ztimer_clock_t *const ZTIMER_MSEC = &_ztimer_convert_frac_msec.super; +ztimer_clock_t *const ZTIMER_MSEC = &_ztimer_convert_frac_msec.super.super; # define ZTIMER_MSEC_CONVERT_LOWER_FREQ RTT_FREQUENCY # define ZTIMER_MSEC_CONVERT_LOWER (&_ztimer_periph_timer_rtt_msec) # else @@ -159,13 +159,13 @@ void ztimer_init(void) #ifdef ZTIMER_RTT_INIT LOG_DEBUG("ztimer_init(): initializing rtt\n"); - ztimer_periph_timer_rtt_init(ZTIMER_RTT_INIT); + ztimer_periph_rtt_init(ZTIMER_RTT_INIT); #endif #if MODULE_ZTIMER_MSEC # if ZTIMER_MSEC_CONVERT_LOWER_FREQ LOG_DEBUG("ztimer_init(): ZTIMER_MSEC convert_frac from %lu to 1000\n", - ZTIMER_MSEC_CONVERT_LOWER_FREQ); + (long unsigned) ZTIMER_MSEC_CONVERT_LOWER_FREQ); ztimer_convert_frac_init(&_ztimer_convert_frac_msec, ZTIMER_MSEC_CONVERT_LOWER, FREQ_1KHZ, ZTIMER_MSEC_CONVERT_LOWER_FREQ);