1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/ztimer: allow configuring ZTIMER_[UM]SEC adjust value

This commit is contained in:
Kaspar Schleiser 2020-03-04 11:17:49 +01:00
parent dbe1270f66
commit 2ad4ea67e9

View File

@ -155,6 +155,11 @@ void ztimer_init(void)
FREQ_1MHZ, CONFIG_ZTIMER_USEC_FREQ);
# endif
# endif
# ifdef CONFIG_ZTIMER_USEC_ADJUST
LOG_DEBUG("ztimer_init(): ZTIMER_USEC setting adjust value to %i\n",
CONFIG_ZTIMER_USEC_ADJUST);
ZTIMER_USEC->adjust = CONFIG_ZTIMER_USEC_ADJUST;
# endif
#endif
#ifdef ZTIMER_RTT_INIT
@ -170,5 +175,10 @@ void ztimer_init(void)
ZTIMER_MSEC_CONVERT_LOWER,
FREQ_1KHZ, ZTIMER_MSEC_CONVERT_LOWER_FREQ);
# endif
# ifdef CONFIG_ZTIMER_MSEC_ADJUST
LOG_DEBUG("ztimer_init(): ZTIMER_MSEC setting adjust value to %i\n",
CONFIG_ZTIMER_MSEC_ADJUST);
ZTIMER_MSEC->adjust = CONFIG_ZTIMER_MSEC_ADJUST;
# endif
#endif
}