event/timeout: remove forced ZTIMER_USEC dependency#16892
event/timeout: remove forced ZTIMER_USEC dependency#16892haukepetersen wants to merge 2 commits intoRIOT-OS:masterfrom
Conversation
|
From a quick look, I like the approach, looks as a good solution IMO. |
Although maybe we should go the same way as the netdev2 migration, and first call it |
I have an alternative allowing for the same result but making with the inverse approach making drop-in replacement easy. See here a POC, I can PR. Basically, instead of adding a new module for the legacy API, make What do you think @haukepetersen? In the long term marking the old api as legacy is best, with the current speed at wich we change things this seems like maybe the more sensible path. |
|
closing in favor of #16958 |
Contribution description
This PR is (for now) simply a rough draft on how #16891 could be addressed. The goal is to remove the forced
ZTIMER_USECdependency fromevent/timeout, as this disables low-power modes on many platforms, even if theUSECtimer is actually never used in the build...The idea is to change the style of back-end timer selection a little bit for this module:
ztimeris always preferred -> so ifztimeris included in the build, it is automatically selected as backend. In the majority of RIOT builds, this is most likely the case by now...event_timeout_init()is not available. If modules (still) use this, it must be actively enabled by declaring a dependency onevent_timeout_legacy.TODO:
event_timeout_ztimermodule can be removedevent_timeoutmust be changed to depend onevent_timeout_legacygcoapordhcp_clientshoudl be migrated to use theevent_timeout_ztimer_x()functions, possibly while migrating the complete modules toztimer:-)So what do you think?
Testing procedure
n/a as of now
Issues/PRs references
fixes #16891