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

Merge pull request #13570 from kaspar030/ztimer_allow_adjust_config

sys/ztimer: allow "adjust" config for ztimer_usec, ztimer_msec
This commit is contained in:
Koen Zandberg 2020-03-10 11:58:21 +01:00 committed by GitHub
commit c2f9700f5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}