mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/xtimer: prefer ztimer_xtimer_compat
This commit is contained in:
parent
0b1453667e
commit
9260cfb4f0
@ -1,11 +1,11 @@
|
|||||||
# Include this for boards whose timer periph cannot generate a clock frequency
|
# Include this for boards whose timer periph cannot generate a clock frequency
|
||||||
# suitable for xtimer with the available clock sources and dividers.
|
# suitable for xtimer with the available clock sources and dividers.
|
||||||
# This will use ztimer to perform the required frequency conversion.
|
# This will use ztimer to perform the required frequency conversion.
|
||||||
# By default, xtimer is still used with ztimer as backed, unless
|
# By default, ztimer_xtimer_compat is used unless xtimer_on_ztimer is
|
||||||
# ztimer_xtimer_compat is used.
|
# selected.
|
||||||
|
|
||||||
ifneq (,$(filter xtimer,$(USEMODULE)))
|
ifneq (,$(filter xtimer,$(USEMODULE)))
|
||||||
ifeq (,$(filter ztimer_xtimer_compat ztimer64_xtimer_compat,$(USEMODULE)))
|
ifeq (,$(filter xtimer_on_ztimer,$(USEMODULE)))
|
||||||
USEMODULE += xtimer_on_ztimer
|
USEMODULE += ztimer_xtimer_compat
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -9,13 +9,13 @@ FEATURES_REQUIRED += periph_timer
|
|||||||
|
|
||||||
USEMODULE += xtimer_no_ztimer_default
|
USEMODULE += xtimer_no_ztimer_default
|
||||||
ifeq (,$(filter xtimer_no_ztimer_default,$(USEMODULE)))
|
ifeq (,$(filter xtimer_no_ztimer_default,$(USEMODULE)))
|
||||||
ifeq (,$(filter ztimer_xtimer_compat,$(USEMODULE)))
|
ifeq (,$(filter xtimer_on_ztimer,$(USEMODULE)))
|
||||||
USEMODULE += xtimer_on_ztimer
|
USEMODULE += ztimer_xtimer_compat
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifneq (,$(filter ztimer,$(USEMODULE)))
|
ifneq (,$(filter ztimer,$(USEMODULE)))
|
||||||
ifeq (,$(filter ztimer_xtimer_compat,$(USEMODULE)))
|
ifeq (,$(filter xtimer_on_ztimer,$(USEMODULE)))
|
||||||
USEMODULE += xtimer_on_ztimer
|
USEMODULE += ztimer_xtimer_compat
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -143,23 +143,18 @@ choice
|
|||||||
bool "xtimer compatibility"
|
bool "xtimer compatibility"
|
||||||
depends on MODULE_XTIMER && MODULE_ZTIMER
|
depends on MODULE_XTIMER && MODULE_ZTIMER
|
||||||
|
|
||||||
config MODULE_XTIMER_ON_ZTIMER
|
|
||||||
bool "ztimer_usec as timer backend for xtimer"
|
|
||||||
select MODULE_ZTIMER_USEC
|
|
||||||
select MODULE_ZTIMER_PERIPH_TIMER
|
|
||||||
|
|
||||||
config MODULE_ZTIMER_XTIMER_COMPAT
|
config MODULE_ZTIMER_XTIMER_COMPAT
|
||||||
bool "map xtimer calls to ztimer"
|
bool "map xtimer calls to ztimer"
|
||||||
select MODULE_DIV
|
select MODULE_DIV
|
||||||
select MODULE_ZTIMER_USEC
|
select MODULE_ZTIMER_USEC
|
||||||
select MODULE_ZTIMER_PERIPH_TIMER
|
select MODULE_ZTIMER_PERIPH_TIMER
|
||||||
help
|
help
|
||||||
This is a wrapper of xtimer API on ztimer_usec and is currently
|
This is a wrapper of xtimer API on ztimer_usec.
|
||||||
incomplete. Unless doing testing, use xtimer on ztimer.
|
|
||||||
|
|
||||||
comment "The ztimer xtimer compatibility module is incomplete, consider using MODULE_ZTIMER64_XTIMER_COMPAT instead."
|
|
||||||
depends on MODULE_ZTIMER_XTIMER_COMPAT
|
|
||||||
|
|
||||||
|
config MODULE_XTIMER_ON_ZTIMER
|
||||||
|
bool "ztimer_usec as timer backend for xtimer"
|
||||||
|
select MODULE_ZTIMER_USEC
|
||||||
|
select MODULE_ZTIMER_PERIPH_TIMER
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config MODULE_ZTIMER64_XTIMER_COMPAT
|
config MODULE_ZTIMER64_XTIMER_COMPAT
|
||||||
|
Loading…
Reference in New Issue
Block a user