mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/ztimer: adapt to DEFAULT_MODULE based auto_init scheme
This commit is contained in:
parent
8c1e577a06
commit
21613b0aa6
@ -392,7 +392,7 @@ void auto_init(void)
|
||||
extern void auto_init_random(void);
|
||||
auto_init_random();
|
||||
}
|
||||
if (IS_USED(MODULE_ZTIMER)) {
|
||||
if (IS_USED(MODULE_AUTO_INIT_ZTIMER)) {
|
||||
LOG_DEBUG("Auto init ztimer.\n");
|
||||
void ztimer_init(void);
|
||||
ztimer_init();
|
||||
|
@ -5,10 +5,23 @@
|
||||
|
||||
# "ztimer" is the default meta-module of ztimer
|
||||
ifneq (,$(filter ztimer,$(USEMODULE)))
|
||||
USEMODULE += ztimer_auto_init
|
||||
USEMODULE += ztimer_core
|
||||
USEMODULE += ztimer_convert_frac
|
||||
USEMODULE += ztimer_convert_shift
|
||||
|
||||
# ztimer's auto_init code resides in it's submodule "ztimer_auto_init",
|
||||
# but RIOT's auto_init scheme expects "auto_init_ztimer" in DEFAULT_MODULES so
|
||||
# it can be disabled (by adding to DISABLE_MODULES).
|
||||
#
|
||||
# "auto_init_%" modules cannot have further dependencies, so we cannot do
|
||||
# "if auto_init_ztimer: use ztimer_auto_init".
|
||||
#
|
||||
# So, if neither "auto_init" nor "auto_init_ztimer" are disabled, pull in
|
||||
# "ztimer_auto_init".
|
||||
DEFAULT_MODULE += auto_init_ztimer
|
||||
ifeq (,$(filter auto_init auto_init_ztimer,$(DISABLE_MODULE)))
|
||||
USEMODULE += ztimer_auto_init
|
||||
endif
|
||||
endif
|
||||
|
||||
# "ztimer_xtimer_compat" is a wrapper of the xtimer API on ztimer_used
|
||||
|
Loading…
Reference in New Issue
Block a user