Skip to content

Commit

Permalink
fixup! sys/ztimer: add LPTIMER auto init
Browse files Browse the repository at this point in the history
  • Loading branch information
kfessel committed Jul 19, 2022
1 parent b80c387 commit b75433a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sys/ztimer/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
#endif

#if MODULE_ZTIMER_PERIPH_LPTIMER
# define ZTIMER_LPTIMER _ztimer_periph_timer
# define ZTIMER_LPTIMER_CLK _ztimer_periph_timer.super
# define ZTIMER_LPTIMER _ztimer_periph_timer_lp
# define ZTIMER_LPTIMER_CLK _ztimer_periph_timer_lp.super
# define ZTIMER_LPTIMER_FREQ CONFIG_ZTIMER_LPTIMER_FREQ
#endif

Expand Down Expand Up @@ -140,7 +140,7 @@
# if ZTIMER_LPTIMER_FREQ != FREQ_1HZ
# define ZTIMER_SEC_CONVERT_LOWER_FREQ ZTIMER_LPTIMER_FREQ
# endif
# ifdef ZTIMER_RTT
# elif defined(ZTIMER_RTT)
# define ZTIMER_SEC_RTT
# ifndef INIT_ZTIMER_RTT
# define INIT_ZTIMER_RTT 1
Expand Down Expand Up @@ -202,7 +202,7 @@ ztimer_clock_t *const ZTIMER_USEC = &_ztimer_convert_frac_usec.super.super;
#endif

#if MODULE_ZTIMER_MSEC
# if def ZTIMER_MSEC_RTT
# ifdef ZTIMER_MSEC_RTT
ztimer_clock_t *const ZTIMER_MSEC_BASE = &ZTIMER_RTT_CLK;
# elif defined(ZTIMER_MSEC_TIMER)
ztimer_clock_t *const ZTIMER_MSEC_BASE = &ZTIMER_TIMER_CLK;
Expand All @@ -215,7 +215,7 @@ ztimer_clock_t *const ZTIMER_MSEC_BASE = &ZTIMER_LPTIMER_CLK;
static ztimer_convert_frac_t _ztimer_convert_frac_msec;
ztimer_clock_t *const ZTIMER_MSEC = &_ztimer_convert_frac_msec.super.super;
# else
ztimer_clock_t *const ZTIMER_MSEC = &ZTIMER_MSEC_BASE;
ztimer_clock_t *const ZTIMER_MSEC = ZTIMER_MSEC_BASE;
# endif
#endif

Expand All @@ -236,7 +236,7 @@ ztimer_clock_t *const ZTIMER_SEC_BASE = &ZTIMER_LPTIMER_CLK;
static ztimer_convert_frac_t _ztimer_convert_frac_sec;
ztimer_clock_t *const ZTIMER_SEC = &_ztimer_convert_frac_sec.super.super;
# else
ztimer_clock_t *const ZTIMER_SEC = &ZTIMER_SEC_BASE;
ztimer_clock_t *const ZTIMER_SEC = ZTIMER_SEC_BASE;
# endif
#endif

Expand Down

0 comments on commit b75433a

Please sign in to comment.