-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sys/*timer: rework dependencies to ease backend switch, prefer ztimer_xtimer_compat over xtimer_on_ztimer #17811
sys/*timer: rework dependencies to ease backend switch, prefer ztimer_xtimer_compat over xtimer_on_ztimer #17811
Conversation
ba51ac8
to
073e369
Compare
073e369
to
08bca79
Compare
4990961
to
f29d966
Compare
If the ci passes the diff switching over would be: diff --git a/sys/xtimer/Kconfig b/sys/xtimer/Kconfig
index f47f7bdc8d..e1d2dbd3b1 100644
--- a/sys/xtimer/Kconfig
+++ b/sys/xtimer/Kconfig
@@ -18,7 +18,6 @@ menuconfig 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"
diff --git a/sys/xtimer/Makefile.dep b/sys/xtimer/Makefile.dep
index 8590f5b14d..03d3e97c6d 100644
--- a/sys/xtimer/Makefile.dep
+++ b/sys/xtimer/Makefile.dep
@@ -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 |
a840936
to
76682c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small comment, otherwise the changes in Kconfig make sense. Now MODULE_ZTIMER_XTIMER_COMPAT
is the default choice option for xtimer when both have to co-exist (or when !MODULE_XTIMER_NO_ZTIMER_DEFAULT
).
Yes, this was done in this commit cfbebb3, should I split nthat one out? |
No no, I was just confirming that the expected behaviour seems to work. From my side you can squash now! |
This adds a xtimer_no_ztimer_default that is currently always selected in Makefile, but that can be switched off in Kconfig. Removing its inclusion will allow switching the default xtimer backend to ztimer, while allowing for an easy way back.
These tests need to be tested on xtimer, and if using ztimer_xtimer_compat the full api will not be provided, therefore also blacklist BOARDs that will en up selecting ztimer by default.
87d658e
to
46ae295
Compare
Squashed! |
All green @kaspar030 @leandrolanzieri |
Then let's go! |
Contribution description
Although I prefer how it's done in #17809, I realize I'm changing a lot of things when the initial objective was only to have an easy-to-switch backend default for
xtimer
, so let's do it simple, even if it keeps all the indirections...Note this PR also changes the default prefered
xtimer
backend toztimer_on_xtimer
, that can also be an individual PR.Marking as WIP will I let Murdock check I didn't make a fundamentally wrong change.Testing procedure
Issues/PRs references
#17721