mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-17 10:33:49 +01:00
Add a uard around macro BTN0_PIN definition to allow the user to redefine it in order to use the SPI module. Add a guard around SAUL parameters that use BTN0_PIN to avoid error when it is redefined.
18 lines
645 B
Makefile
18 lines
645 B
Makefile
ifneq (,$(filter periph_spi, $(USEMODULE)))
|
|
ifeq (,$(filter periph_init_buttons, $(DISABLE_MODULE)))
|
|
DISABLE_MODULE += periph_init_buttons
|
|
|
|
MSG="Warning: Using periph_spi on Seeed Studio Xiao ESP32C3 board will disable BUTTON0 due to pin conflict."
|
|
$(shell $(COLOR_ECHO) "$(COLOR_YELLOW)$(MSG)$(COLOR_RESET)" 1>&2)
|
|
endif
|
|
else ifneq (,$(filter saul_default,$(USEMODULE)))
|
|
# The button is the only SAUL device. Enable it only when SPI is not enabled.
|
|
USEMODULE += saul_gpio
|
|
endif
|
|
|
|
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
|
|
USEMODULE += stdio_usb_serial_jtag
|
|
endif
|
|
|
|
include $(RIOTBOARD)/common/esp32c3/Makefile.dep
|