diff --git a/boards/esp32-ethernet-kit-v1_0/Makefile.features b/boards/esp32-ethernet-kit-v1_0/Makefile.features index b71c3336e6..a0963f25c2 100644 --- a/boards/esp32-ethernet-kit-v1_0/Makefile.features +++ b/boards/esp32-ethernet-kit-v1_0/Makefile.features @@ -8,6 +8,10 @@ FEATURES_PROVIDED += periph_adc FEATURES_PROVIDED += periph_i2c FEATURES_PROVIDED += periph_pwm +ifeq (,$(filter esp_jtag,$(USEMODULE))) + FEATURES_PROVIDED += periph_spi +endif + # unique features provided by the board FEATURES_PROVIDED += esp_jtag FEATURES_PROVIDED += esp_spi_ram diff --git a/boards/esp32-ethernet-kit-v1_0/include/periph_conf.h b/boards/esp32-ethernet-kit-v1_0/include/periph_conf.h index dc54ea9f88..d729eccdb9 100644 --- a/boards/esp32-ethernet-kit-v1_0/include/periph_conf.h +++ b/boards/esp32-ethernet-kit-v1_0/include/periph_conf.h @@ -93,6 +93,23 @@ #endif /** @} */ +/** + * @name SPI configuration + * + * SPI configuration depends on configured/connected components. + * + * HSPI is only available when all JTAG pins are disabled. + * + * @{ + */ +#ifndef MODULE_ESP_JTAG +#define SPI0_CTRL HSPI /**< HSPI is used as SPI_DEV(0) */ +#define SPI0_SCK GPIO14 /**< HSPI SCK */ +#define SPI0_MISO GPIO12 /**< HSPI MISO */ +#define SPI0_MOSI GPIO13 /**< HSPI MOSI */ +#define SPI0_CS0 GPIO15 /**< HSPI CS0 */ +#endif /* MODULE_ESP_JTAG not defined */ +/** @} */ /** * @name UART configuration