From 60a77948a7f37855075806ab589d5768bceea3d0 Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Thu, 2 Feb 2023 13:49:14 +0100 Subject: [PATCH] Makefile.dep: pull in FEATURES_REQUIRED for periph Whenever the module of a peripheral driver, i.e., periph_* should be used, the corresponding entry in the FEATURES_REQUIRED should be added. Conflicts between these modules are only checked when this entry is present. --- makefiles/features_modules.inc.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/makefiles/features_modules.inc.mk b/makefiles/features_modules.inc.mk index a903aad5e1..bf81715dc1 100644 --- a/makefiles/features_modules.inc.mk +++ b/makefiles/features_modules.inc.mk @@ -97,3 +97,10 @@ USEMODULE += $(filter vdd_lc_filter_%,$(FEATURES_USED)) # select arduino_pwm pseudomodule if the corresponding feature is used USEMODULE += $(filter arduino_pwm, $(FEATURES_USED)) + +# always register a peripheral driver as a required feature when the corresponding +# module is requested +PERIPH_IGNORE_MODULES += periph_usbdev_clk periph_gpio_mock periph_gpio_linux +ifneq (,$(filter periph_%,$(DEFAULT_MODULE))) + FEATURES_REQUIRED += $(filter-out $(PERIPH_IGNORE_MODULES),$(filter periph_%,$(USEMODULE))) +endif