Skip to content

Commit

Permalink
sys/xtimer: switch default backend to ztimer
Browse files Browse the repository at this point in the history
With this commit xtimer will always be implemented with ztimer.
The default compat layer will be ztimer_xtimer_compat, so xtimer
calls will be inlined to ZTIMER_USEC, or ZTIMER64_USEC when the
64bit xtimer API is required.

This can be reverted by adding 'xtimer_no_ztimer_default' module
to a build.
  • Loading branch information
fjmolinas committed Mar 18, 2022
1 parent 2681b6c commit 20e68fb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion sys/xtimer/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ if MODULE_XTIMER

config MODULE_XTIMER_NO_ZTIMER_DEFAULT
bool "xtimer does not select ztimer"
default y

config MODULE_AUTO_INIT_XTIMER
bool "Auto-init xtimer"
Expand Down
1 change: 0 additions & 1 deletion sys/xtimer/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ DEFAULT_MODULE += auto_init_xtimer
# dependency inclusion order issues
FEATURES_REQUIRED += periph_timer

USEMODULE += xtimer_no_ztimer_default
ifeq (,$(filter xtimer_no_ztimer_default,$(USEMODULE)))
ifeq (,$(filter xtimer_on_ztimer,$(USEMODULE)))
USEMODULE += ztimer_xtimer_compat
Expand Down

0 comments on commit 20e68fb

Please sign in to comment.