Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/ztimer: fix RTT backend #13574

Merged
merged 1 commit into from
Mar 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions sys/ztimer/auto_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ups, I thing this happened when renaming ztimer_(periph|rtt|rtc) to ztimer_periph_(timer|rtt|rtc) with search&replace.

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 @@ -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);
Expand Down