Skip to content

Commit

Permalink
ztimer: fix RTT backend
Browse files Browse the repository at this point in the history
  • Loading branch information
jue89 committed Mar 6, 2020
1 parent ed31630 commit 951b3a4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sys/ztimer/auto_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,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
Expand Down Expand Up @@ -160,13 +160,13 @@ void ztimer_init(void)

#ifdef ZTIMER_RTT_INIT
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
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);
Expand Down

0 comments on commit 951b3a4

Please sign in to comment.