From 538327805b1a9041fb124b9900d85afcd20be179 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Tue, 2 Nov 2021 09:06:08 +0100 Subject: [PATCH] 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. --- kconfigs/Kconfig.ztimer_only | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 kconfigs/Kconfig.ztimer_only diff --git a/kconfigs/Kconfig.ztimer_only b/kconfigs/Kconfig.ztimer_only new file mode 100644 index 0000000000..757d7741b2 --- /dev/null +++ b/kconfigs/Kconfig.ztimer_only @@ -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.