[riot-notifications] [RIOT-OS/RIOT] ztimer: add ztimer_is_set() to user API (#15780)
notifications at github.com
Fri Jan 15 14:49:11 CET 2021
### Contribution description
To improve the low power support I am currently porting NimBLE to use `ztimer` as RIOT timer backend. Mapping the `ztimer` API works mostly flawless, the only thing missing is a `is_set()` function. The current implementation uses an ugly hack by using xtimer internal struct members to do this check -> so for the improved port I'd like to have this less error prone :-)
This PR simply exposes `ztimer`s internal `_is_set()` function by wrapping it into a critical section inside a newly added `ztimer_is_set()` user API function. Should be pretty straight forward.
### Testing procedure
I added a call to the new `ztimer_is_set()` function in `tests/ztimer_periodic`. So simply run `tests/ztimer_periodic` on any platform -> it should succeed as expected.
### Issues/PRs references
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* ztimer: expose ztimer_is_set() to public API
* tests/ztimer_periodic: add call to ztimer_is_set()
-- File Changes --
M sys/include/ztimer.h (11)
M sys/ztimer/core.c (8)
M tests/ztimer_periodic/main.c (5)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications