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

sys/ztimer: don't default to rtc for ztimer_sec

This commit is contained in:
Francisco Molina 2021-11-02 15:31:04 +01:00
parent 49cecdbc44
commit 2e4dfa0aac
2 changed files with 4 additions and 19 deletions

View File

@ -74,8 +74,6 @@ config MODULE_ZTIMER_SEC
choice
bool "Backend"
depends on MODULE_ZTIMER_SEC
default ZTIMER_SEC_BACKEND_RTC if !BOARD_NATIVE && \
!HAVE_SHARED_PERIPH_RTT_PERIPH_RTC
default ZTIMER_SEC_BACKEND_RTT
config ZTIMER_SEC_BACKEND_TIMER

View File

@ -111,24 +111,11 @@ endif
ifneq (,$(filter ztimer_sec,$(USEMODULE)))
USEMODULE += ztimer
# try to use RTC unless we are on native, as it is based on xtimer it is
# actually buggy
ifeq (,$(filter native,$(BOARD)))
FEATURES_OPTIONAL += periph_rtc
endif
FEATURES_OPTIONAL += periph_rtt
# HACK: see above
include $(RIOTMAKE)/features_check.inc.mk
ifneq (,$(filter periph_rtc,$(FEATURES_USED)))
USEMODULE += ztimer_periph_rtc
ifneq (,$(filter periph_rtt,$(FEATURES_USED)))
USEMODULE += ztimer_periph_rtt
else
# if there is no RTC try to use RTT
FEATURES_OPTIONAL += periph_rtt
# HACK: see above
include $(RIOTMAKE)/features_check.inc.mk
ifneq (,$(filter periph_rtt,$(FEATURES_USED)))
USEMODULE += ztimer_periph_rtt
else
USEMODULE += ztimer_periph_timer
endif
USEMODULE += ztimer_periph_timer
endif
endif