1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

137 Commits

Author SHA1 Message Date
Juergen Fitschen
a1ee7a5e05 ztimer/periph_rtt: add start() and stop() ops 2022-11-22 00:25:34 +01:00
Juergen Fitschen
d22e078118 ztimer/periph_rtc: add start() and stop() ops 2022-11-22 00:25:34 +01:00
Jue
5818e5e452 ztimer/periph_timer: add start() and stop() ops 2022-11-22 00:25:34 +01:00
Juergen Fitschen
90b2f3158c ztimer/convert: pass-thru start/stop ops to lower timer 2022-11-22 00:25:34 +01:00
Jue
9fbb4d3391 ztimer/convert: only extend the clocks if ztimer_ondemand isn't used 2022-11-22 00:25:34 +01:00
Jue
4013dff1fd ztimer: acquire and release clock for running timers 2022-11-22 00:25:34 +01:00
Jue
a228ca7548 ztimer: introduce ztimer_acquire() and ztimer_release() 2022-11-22 00:25:34 +01:00
Jue
904dc0131f ztimer: don't interact with pm_layered if ztimer_ondemand is used 2022-11-02 22:36:54 +01:00
Juergen Fitschen
84c89f9dd7
Merge pull request #18783 from jue89/fix/ztimer_lptimer_kconfig
sys/ztimer: model ztimer_periph_lptimer for Kconfig
2022-11-02 13:56:05 +01:00
benpicco
ed1d8e0a3d
Merge pull request #18785 from maribu/boards/blxxxpill/periph_conf
boards/common/blxxxpill: Fix pin conflicts in periph_conf
2022-10-27 21:22:10 +02:00
Jue
bd603249a5 sys/ztimer: build ztimer_periph_timer if ztimer_periph_lptimer is used
ztimer_periph_lptimer is uses the implementation of ztimer_periph_timer
2022-10-27 19:44:57 +02:00
Marian Buschsieweke
16df27c51d
makefiles/cflags.inc.mk: Add -Wno-missing-field-initializers to CXXFLAGS
This allows including C headers from C++. It sadly reduced the
diagnostics on C++ code as well, were there warning may make sense as
unintended side effect. We may be able to drop that later on, when more
C APIs are properly wrapped in native C++ APIs, so that C headers do no
longer need to be compatible with C++ compilers.
2022-10-27 14:28:06 +02:00
MrKevinWeiss
6b5c75cad4
boards/blxxpill-128kib: Fix kconfig mismatch
Nightlies are failing due to kconfig mismatch.
It would seem this is a result of bringing in the USB stuff.
I assume that this uses ztimer periph_timer as a backend as periph_timer is already selected.
However, kconfig only resolves one and not recursively making it hard to match.
For not a hack is added to override for these boards.
2022-10-27 14:07:32 +02:00
Juergen Fitschen
b8a4aa9ce1 sys/ztimer: model ztimer_periph_lptimer 2022-10-26 20:53:48 +02:00
Karl Fessel
81d06c819c sys/ztimer: add LPTIMER auto init 2022-09-15 11:26:22 +02:00
Karl Fessel
594fe83843 sys/ztimer: auto_init react to possibly missing ztimer_periph_timer 2022-09-15 11:26:22 +02:00
Francisco Molina
c9fc236576 sys/ztimer: no log for stdio_rtt/semihosting
Both modules use ztimer for stdio, so can't call stdio based functions
before the module is initialized
2022-06-07 08:51:10 +02:00
Martine Lenders
a81c5a527e
ztimer: initialized un-initialized timer objects 2022-03-28 16:57:20 +02:00
Leandro Lanzieri
202fb261fe
Merge pull request #17811 from fjmolinas/pr_xtimer_dep_rework_simple
sys/*timer: rework dependecies to ease backend switch, prefer ztimer_xtimer_compat over xtimer_on_ztimer
2022-03-18 08:17:24 +01:00
Francisco Molina
9260cfb4f0 sys/xtimer: prefer ztimer_xtimer_compat 2022-03-17 14:37:40 +01:00
Francisco Molina
0b1453667e sys/xtimer-ztimer: rework dependecies to ease backend switch
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.
2022-03-17 14:37:40 +01:00
Francisco Molina
53c3e38cb9 sys/ztimer: select ztimer_periph_no_rtt only for samd21 2022-03-15 08:15:22 +01:00
Francisco
0c166b1e2a
Merge pull request #17732 from fjmolinas/pr_xtimer_compat_deps
sys: sort out ztimer_xtimer_compat and ztimer64_xtimer_compat depes
2022-03-04 08:08:41 +01:00
benpicco
21205bd6ce
Merge pull request #17351 from benpicco/ztimer_periodic-return
ztimer_periodic: make callback function return bool
2022-03-03 14:42:33 +01:00
Francisco Molina
f1d4cc0924 sys/ztimer/Kconfig: remv dep between ztimer64_compat and ztimer_compat
This is done to avoid circular dependency, it will currently allow for
ztimer64_xtimer_compat beeing selected as well as xtimer_on_ztimer.
This altough incorrect mimics make, and will be fixed when making
ztimer_xtimer_compat the default xtimer backend
2022-03-02 14:28:55 +01:00
df8086091f sys/ztimer: add ztimer64_xtimer_compat
The ztimer64_xtimer_compat modules implements the whole xtimer api
on top of ztimer64_usec
2022-02-24 09:10:58 +01:00
d758cb93ef sys/ztimer: add auto_adjust module 2022-02-18 13:07:49 +01:00
Francisco Molina
3de5549899 makefile: move DEFAULT_MODULEs with deps to default_modules.deps.mk 2022-02-14 13:03:32 +01:00
Marian Buschsieweke
b6b7065ddc
core/rmutex: use atomic utils
Replace use of C11 atomics with atomic utils. This fixes

> error: address argument to atomic operation must be a pointer to a
>        trivially-copyable type ('_Atomic(int) *' invalid)

error when compiling on AVR with LLVM.
2022-01-14 09:52:17 +01:00
43988120f9
Merge pull request #17409 from kaspar030/ztimer_no_timer_fix
sys/ztimer: don't access non-existant timer
2021-12-17 23:27:04 +01:00
chrysn
9e35b75ff4
Merge pull request #17408 from chrysn-pull-requests/ztimer-report-removal
sys/ztimer: ztimer_remove report success
2021-12-17 08:57:14 +01:00
chrysn
991f74a62a sys/ztimer: ztimer_remove return its success
Co-authored-by: Marian Buschsieweke <maribu@users.noreply.github.com>
2021-12-16 15:35:17 +01:00
b551bbf747 sys/ztimer: don't access non-existant timer 2021-12-15 15:51:59 +01:00
Francisco
03a004e3c9
Merge pull request #17395 from fjmolinas/pr_cpu_no_rtt
cpu: do not auto-select ztimer_periph_rtt for sam0, fe310
2021-12-15 14:04:57 +01:00
Francisco Molina
c21c01b5b9 sys/ztimer: fix kconfig ZTIMER_SEC default 2021-12-14 18:44:48 +01:00
Francisco Molina
5e47fc7e22 cpu: do not auto-select ztimer_periph_rtt for sam0, fe310
The sam0 rtt busy loops for 180us every time an alarm is set or
the counter is read, this propagates and leads to timing errors
on ztimer_msec that are higher than > +-1msec.

The same goes for fe310.
2021-12-14 18:43:53 +01:00
Karl Fessel
4d70d939ca sys/evtimer,ztimer: do not depend on ztimer_now64 2021-12-14 14:41:06 +01:00
Francisco Molina
dd03d8c362 sys/ztimer: ztimer_set return the now value 2021-12-13 11:21:23 +01:00
Leandro Lanzieri
1733953b49
sys/ztimer: fix backend selection 2021-12-10 09:57:05 +01:00
d959ce7eea
Merge pull request #16928 from kaspar030/ztimer64
sys/ztimer64: initial PR
2021-12-09 10:17:15 +01:00
Benjamin Valentin
64bd80d389 ztimer_periodic: make callback function return bool
The callback function of `ztimer_periodic` is only expected to have
two states.
So let it return `true` if the timer should keep repeating, `false`
otherwise.
2021-12-08 00:10:55 +01:00
Francisco Molina
b65ab31971 sys/ztimer/periodic: always set timer->last, no ztimer_now on last call 2021-12-07 19:42:45 +01:00
495a48af0f sys/ztimer: add ZTIMER_PERIPH_TIMER_OFFSET 2021-12-07 11:06:07 +01:00
Francisco
662aba4680
Merge pull request #17307 from leandrolanzieri/pr/sys/ztimer/kconfig/fix_compat_deps
sys/ztimer/kconfig: enable xtimer compat only with timer backend
2021-12-02 14:52:30 +01:00
b6cc07009f
Merge pull request #17284 from fjmolinas/pr_ztimer_no_periph_rtt
sys/ztimer: add 'ztimer_no_periph_rtt'
2021-12-02 11:02:24 +01:00
Leandro Lanzieri
004da59672
sys/ztimer/kconfig: enable xtimer compat only with timer backend
This also moves the selection of MODULE_ZTIMER_PERIPH_TIMER from
MODULE_ZTIMER_USEC to the visible symbol ZTIMER_USEC.
2021-12-02 09:38:06 +01:00
Francisco Molina
638373eec5 sys/ztimer: add ztimer_periph_rtt module conflict warning 2021-12-02 07:54:38 +01:00
Francisco Molina
7c3360e4d6 sys/ztimer: add 'ztimer_no_periph_rtt'
This is a temporary fix for Issue #17060. It allows to disable
auto inclusion of `ztimer_periph_rtt` in cases where another
module or application requires direct access.

Limitations:
- as ifeq are involved order of inclusion matters, therefore
  these modules should be included early in the build at application
  level and not in modules `Makefile.dep`
- this does not disallow direct inclusions of `ztimer_periph_rtt`,
  since this only disables auto inclusion of these modules

This is a temporary solution since this is already possible with
Kconfig, but not in make.
2021-12-02 07:54:38 +01:00
Francisco Molina
d0758b5a7e sys/ztimer: remove double ztimer indirection
To avoid confusions between `auto_init_ztimer` and `ztimer_auto_init`
rename `ztimer_auto_init` to `ztimer_init`.

This allows for similar handling as `saul_init_devs` and
`auto_init_devs`. Dependencies are therefore done against the USEMODULE
and not DEFAULT_MODULE or checking DISABLE_MODULE. For this, both
`ztimer_init` and `auto_init_ztimer` are added to DEFAULT_MODULE and
both need disabling if the user does not want that module in.

With this, the comment in Kconfig no longer applies.
2021-11-25 11:26:34 +01:00
4c03d10f7b
Merge pull request #17234 from fjmolinas/pr_cocci_ztimer_fixes
sys/ztimer/xtimer2ztimer.cocci: extend and fix api replacements
2021-11-19 15:18:07 +01:00