From 5db461c28b5d237644a65d16ed817d338b574698 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Mon, 20 May 2024 11:25:35 +0200 Subject: [PATCH] drivers/periph_gpio_ll: always use hardware features GPIO LL headers might be included even when not using GPIO LL. Some functions may be provided by the common header or the platform specific one, depending on the features used. Hence, the header can only be safely included if the correct set of GPIO LL hardware features is used. --- drivers/periph_common/Makefile.dep | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/periph_common/Makefile.dep b/drivers/periph_common/Makefile.dep index a434e87e04..285131db7d 100644 --- a/drivers/periph_common/Makefile.dep +++ b/drivers/periph_common/Makefile.dep @@ -1,16 +1,14 @@ # Always use hardware features, if available -ifneq (,$(filter periph_gpio_ll%,$(USEMODULE))) - FEATURES_OPTIONAL += periph_gpio_ll_disconnect - FEATURES_OPTIONAL += periph_gpio_ll_input_pull_down - FEATURES_OPTIONAL += periph_gpio_ll_input_pull_keep - FEATURES_OPTIONAL += periph_gpio_ll_input_pull_up - FEATURES_OPTIONAL += periph_gpio_ll_irq_edge_triggered_both - FEATURES_OPTIONAL += periph_gpio_ll_irq_level_triggered_high - FEATURES_OPTIONAL += periph_gpio_ll_irq_level_triggered_low - FEATURES_OPTIONAL += periph_gpio_ll_irq_unmask - FEATURES_OPTIONAL += periph_gpio_ll_open_drain - FEATURES_OPTIONAL += periph_gpio_ll_open_drain_pull_up - FEATURES_OPTIONAL += periph_gpio_ll_open_source - FEATURES_OPTIONAL += periph_gpio_ll_open_source_pull_down - FEATURES_OPTIONAL += periph_gpio_ll_switch_dir -endif +FEATURES_OPTIONAL += periph_gpio_ll_disconnect +FEATURES_OPTIONAL += periph_gpio_ll_input_pull_down +FEATURES_OPTIONAL += periph_gpio_ll_input_pull_keep +FEATURES_OPTIONAL += periph_gpio_ll_input_pull_up +FEATURES_OPTIONAL += periph_gpio_ll_irq_edge_triggered_both +FEATURES_OPTIONAL += periph_gpio_ll_irq_level_triggered_high +FEATURES_OPTIONAL += periph_gpio_ll_irq_level_triggered_low +FEATURES_OPTIONAL += periph_gpio_ll_irq_unmask +FEATURES_OPTIONAL += periph_gpio_ll_open_drain +FEATURES_OPTIONAL += periph_gpio_ll_open_drain_pull_up +FEATURES_OPTIONAL += periph_gpio_ll_open_source +FEATURES_OPTIONAL += periph_gpio_ll_open_source_pull_down +FEATURES_OPTIONAL += periph_gpio_ll_switch_dir