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

cpu/efm32: select series-specific drivers in periph Makefile

This will allow to share implementations across a subset of EFM32 series.
This commit is contained in:
Jue 2022-02-17 11:09:24 +01:00
parent bdc827dd30
commit 4bb6a764ea
2 changed files with 29 additions and 12 deletions

View File

@ -1,15 +1,3 @@
ifneq (,$(filter periph_rtc,$(USEMODULE)))
USEMODULE += periph_rtc_series$(EFM32_SERIES)
endif
ifneq (,$(filter periph_rtt,$(USEMODULE)))
USEMODULE += periph_rtt_series$(EFM32_SERIES)
endif
ifneq (,$(filter periph_wdt,$(USEMODULE)))
USEMODULE += periph_wdt_series$(EFM32_SERIES)
endif
# include Gecko SDK package
USEPKG += gecko_sdk

View File

@ -1 +1,30 @@
include $(RIOTCPU)/efm32/efm32-info.mk
# Select the correct implementation for `periph_rtc`
ifneq (,$(filter periph_rtc,$(USEMODULE)))
ifeq (0,$(EFM32_SERIES))
SRC += rtc_series0.c
else ifeq (1,$(EFM32_SERIES))
SRC += rtc_series1.c
endif
endif
# Select the correct implementation for `periph_rtt`
ifneq (,$(filter periph_rtt,$(USEMODULE)))
ifeq (0,$(EFM32_SERIES))
SRC += rtt_series0.c
else ifeq (1,$(EFM32_SERIES))
SRC += rtt_series1.c
endif
endif
# Select the correct implementation for `periph_wdt`
ifneq (,$(filter periph_wdt,$(USEMODULE)))
ifeq (0,$(EFM32_SERIES))
SRC += wdt_series0.c
else ifeq (1,$(EFM32_SERIES))
SRC += wdt_series1.c
endif
endif
include $(RIOTMAKE)/periph.mk