Skip to content

Commit 77dfc7e

Browse files
committed
boards/esp32*: move saul_gpio dep to board level
The ESP32 Ethernet Kit has only a single GPIO pin exposed to SAUL via `saul_gpio`, but that GPIO doubles as PHY clock input when `esp32_eth` is used. Hence, the `saul_gpio` dep should be optional and only kick in when `esp32_eth` is not used.
1 parent 97a6543 commit 77dfc7e

19 files changed

Lines changed: 75 additions & 4 deletions

File tree

boards/common/esp32x/Makefile.dep

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
USEMODULE += boards_common_esp32x
2-
3-
ifneq (,$(filter saul_default,$(USEMODULE)))
4-
USEMODULE += saul_gpio
5-
endif

boards/esp32-ethernet-kit-v1_0/Makefile.dep

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,13 @@ include $(RIOTBOARD)/common/esp32/Makefile.dep
44
ifneq (,$(filter netdev_default,$(USEMODULE)))
55
USEMODULE += esp_eth
66
endif
7+
8+
# saul_gpio does conflict eth, as the only SAUL enabled GPIO is the boot button.
9+
# But that GPIO doubles as phy clock input.
10+
ifneq (,$(filter esp_eth,$(USEMODULE)))
11+
DISABLE_MODULE += saul_gpio
12+
endif
13+
14+
ifneq (,$(filter saul_default,$(USEMODULE)))
15+
DEFAULT_MODULE += saul_gpio
16+
endif

boards/esp32-heltec-lora32-v2/Makefile.dep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ ifneq (,$(filter netdev_default,$(USEMODULE)))
22
USEMODULE += sx1276
33
endif
44

5+
ifneq (,$(filter saul_default,$(USEMODULE)))
6+
USEMODULE += saul_gpio
7+
endif
8+
59
include $(RIOTBOARD)/common/esp32/Makefile.dep

boards/esp32-mh-et-live-minikit/Makefile.dep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ ifneq (,$(filter sdcard_spi,$(USEMODULE)))
1010
endif
1111
endif
1212

13+
ifneq (,$(filter saul_default,$(USEMODULE)))
14+
USEMODULE += saul_gpio
15+
endif
16+
1317
include $(RIOTBOARD)/common/esp32/Makefile.dep

boards/esp32-ttgo-t-beam/Makefile.dep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ ifneq (,$(filter esp32_ttgo_t_beam_v1_0,$(USEMODULE)))
22
FEATURES_REQUIRED += periph_i2c
33
endif
44

5+
ifneq (,$(filter saul_default,$(USEMODULE)))
6+
USEMODULE += saul_gpio
7+
endif
8+
59
include $(RIOTBOARD)/common/esp32/Makefile.dep

boards/esp32-wemos-lolin-d32-pro/Makefile.dep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ ifneq (,$(filter vfs_default,$(USEMODULE)))
88
USEMODULE += mtd
99
endif
1010

11+
ifneq (,$(filter saul_default,$(USEMODULE)))
12+
USEMODULE += saul_gpio
13+
endif
14+
1115
include $(RIOTBOARD)/common/esp32/Makefile.dep

boards/esp32-wroom-32/Makefile.dep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
include $(RIOTBOARD)/common/esp32/Makefile.dep
2+
3+
ifneq (,$(filter saul_default,$(USEMODULE)))
4+
USEMODULE += saul_gpio
5+
endif

boards/esp32-wrover-kit/Makefile.dep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ ifneq (,$(filter mtd,$(USEMODULE)))
1818
endif
1919
endif
2020

21+
ifneq (,$(filter saul_default,$(USEMODULE)))
22+
USEMODULE += saul_gpio
23+
endif
24+
2125
include $(RIOTBOARD)/common/esp32/Makefile.dep

boards/esp32c3-devkit/Makefile.dep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
include $(RIOTBOARD)/common/esp32c3/Makefile.dep
2+
3+
ifneq (,$(filter saul_default,$(USEMODULE)))
4+
USEMODULE += saul_gpio
5+
endif

boards/esp32c3-wemos-mini/Makefile.dep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ ifeq (,$(filter esp32c3_wemos_mini_v%,$(USEMODULE)))
77
USEMODULE += esp32c3_wemos_mini_v2_1_0
88
endif
99

10+
ifneq (,$(filter saul_default,$(USEMODULE)))
11+
USEMODULE += saul_gpio
12+
endif
13+
1014
include $(RIOTBOARD)/common/esp32c3/Makefile.dep

0 commit comments

Comments
 (0)