event/timeout: remove forced ZTIMER_USEC dependency [alternative]#16958
event/timeout: remove forced ZTIMER_USEC dependency [alternative]#16958kfessel merged 4 commits intoRIOT-OS:masterfrom
Conversation
|
Looks good to me, I like it better than the approach in #16892. So lets roll with it! |
To add Kconfig for this I had to adapt the dependency a bit so that there is no circular dependency with Kconfig. To avoid using xtimer, then |
|
Added Kconfig and updated test procedure |
|
should n't |
The PR description was wrong, |
|
wouldn't |
|
|
I actually just use the header |
How would that work? |
|
in case of |
I'm still not quite sure I understand, so please correct me if I'm wrong, you are suggesting something like this? and in |
|
yes -- |
I can try it out, but I fear a circular dependency... |
|
A lot of issues popping up |
|
Ok ci showed that this is still quite messy... |
It seems like having |
|
Seems there is a circular dependency... |
|
@kfessel I don't think the changes to use the without a dependency loop, which is the equivalent of: |
728caf3 to
a2e7cc6
Compare
|
Trying something else... lets see... |
|
Murdock is finally passing here, Ok to squash @kfessel? Does you ACK still stand? |
|
yes, please squash |
a2e7cc6 to
fcdac23
Compare
fcdac23 to
09b66e9
Compare
Splited. |
This PR makes `event_timeout` and `event_timeout_ztimer` two distinct pseudomodules, where the only api difference is in the init function. If only `event_timeout_ztimer` is selected then no default ZTIMER backend is selected and the old init function is not implemented. If only `event_timeout` is selected then `xtimer` is used unless `ztimer_usec` is included. In which case the `xtimer` wrapper on top of `ztimer` is used and `xtimer` is not directly selected. This allows for the legacy api to be supported with `ztimer_usec` as a drop-in replacement. If `event_timeout` and `event_timeut_ztimer` are selected then `event_timeout` SRC file is excluded from compilation.
09b66e9 to
c74e35c
Compare
|
Rebased |
|
@kfessel all green, since there was a rebase I let you hit the button! |
|
Thanks! |
Contribution description
An alternative to #16892
Basically, instead of adding a new module for the legacy API, make
event_timeout_ztimera module not depending onevent_timeoutand if onlyevent_timeout_ztimeris selected only the new api is implemented (no forced backend). Ifevent_timeoutandevent_timeout_ztimerare selected thenztimer_usecis pulled in for a drop in replacement.Testing procedure
Since this is just changing dependencies, the code should still compile. On
examples/nimble_heart_rate_sensornousectimer is pulled in.tests/eventsxtimer is pulled in by default, ifztimerandztimer_usecare also pulled in thextimer_on_ztimeris added. Ifevent_timeout_ztimeris also added thenxtimeris not pulled in butztimer_usec:Issues/PRs references