sys/{x,z}timer: add file to use ztimer when xtimer is present

This introduces a Kconfig file for boards that cannot reach a timer frequency
compatible with xtimer. For those boards, in the case xtimer is pulled,
ztimer is used instead (as backend) with a compatibility module.
This commit is contained in:
Leandro Lanzieri 2021-11-02 09:06:08 +01:00
parent 39ebbfd460
commit 538327805b
No known key found for this signature in database
GPG Key ID: F4E9A721761C7593

View File

@ -0,0 +1,14 @@
# Include this for boards whose timer periph cannot generate a clock frequency
# suitable for xtimer with the available clock sources and dividers.
# This will use ztimer to perform the required frequency conversion.
# By default, xtimer is still used with ztimer as backed, unless
# ztimer_xtimer_compat is used.
config HAVE_ZTIMER_ONLY
bool
default y
select MODULE_ZTIMER if MODULE_XTIMER
select MODULE_ZTIMER_USEC if MODULE_XTIMER
help
Indicates that the board cannot generate a clock frequency suitable for
xtimer and requires ztimer for conversion. ztimer is used as backend.