diff --git a/boards/common/esp32s3/Kconfig b/boards/common/esp32s3/Kconfig index 89af5dd764..1007d5fcc7 100644 --- a/boards/common/esp32s3/Kconfig +++ b/boards/common/esp32s3/Kconfig @@ -7,8 +7,7 @@ config BOARD_COMMON_ESP32S3 bool - select HAS_PERIPH_UART - select HAVE_SAUL_GPIO + select BOARD_COMMON_ESP32X config MODULE_BOARDS_COMMON_ESP32S3 bool @@ -18,3 +17,5 @@ config MODULE_BOARDS_COMMON_ESP32S3 default y help Common ESP32-S3 boards code. + +source "$(RIOTBOARD)/common/esp32x/Kconfig" diff --git a/boards/common/esp32s3/Makefile b/boards/common/esp32s3/Makefile index 1dbe9ac0e0..7b8e172f6f 100644 --- a/boards/common/esp32s3/Makefile +++ b/boards/common/esp32s3/Makefile @@ -1,3 +1,5 @@ MODULE = boards_common_esp32s3 +DIRS = $(RIOTBOARD)/common/esp32x + include $(RIOTBASE)/Makefile.base diff --git a/boards/common/esp32s3/Makefile.dep b/boards/common/esp32s3/Makefile.dep index a77b54d8c8..71a4add39d 100644 --- a/boards/common/esp32s3/Makefile.dep +++ b/boards/common/esp32s3/Makefile.dep @@ -1,5 +1,3 @@ USEMODULE += boards_common_esp32s3 -ifneq (,$(filter saul_default,$(USEMODULE))) - USEMODULE += saul_gpio -endif +include $(RIOTBOARD)/common/esp32x/Makefile.dep diff --git a/boards/common/esp32s3/Makefile.features b/boards/common/esp32s3/Makefile.features index 067bec4c1b..03c9e7a8cd 100644 --- a/boards/common/esp32s3/Makefile.features +++ b/boards/common/esp32s3/Makefile.features @@ -1,5 +1,3 @@ -CPU = esp32 CPU_FAM = esp32s3 -# additional features provided by all boards is at least one UART -FEATURES_PROVIDED += periph_uart +include $(RIOTBOARD)/common/esp32x/Makefile.features diff --git a/boards/common/esp32s3/Makefile.include b/boards/common/esp32s3/Makefile.include index 896708772b..c245673962 100644 --- a/boards/common/esp32s3/Makefile.include +++ b/boards/common/esp32s3/Makefile.include @@ -1,5 +1,3 @@ INCLUDES += -I$(RIOTBOARD)/common/esp32s3/include -# configure the serial interface -PORT_LINUX ?= /dev/ttyUSB0 -PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) +include $(RIOTBOARD)/common/esp32x/Makefile.include diff --git a/boards/common/esp32s3/include/periph_conf_common_esp32s3.h b/boards/common/esp32s3/include/periph_conf_common_esp32s3.h new file mode 100644 index 0000000000..629c17f273 --- /dev/null +++ b/boards/common/esp32s3/include/periph_conf_common_esp32s3.h @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2022 Gunar Schorcht + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup boards_common_esp32s3 + * @brief Common peripheral configurations for ESP32-S3 boards + * + * This file contains the peripheral configurations that are valid for all + * ESP32-S3 boards. + * + * For detailed information about the peripheral configuration for ESP32-S3 + * boards, see section \ref esp32_peripherals "Common Peripherals". + * + * @author Gunar Schorcht + * @file + * @{ + */ + +#ifndef PERIPH_CONF_COMMON_ESP32S3_H +#define PERIPH_CONF_COMMON_ESP32S3_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @name UART configuration + * @{ + */ +#ifndef UART0_TXD +#define UART0_TXD (GPIO43) /**< TxD of UART_DEV(0) used on all ESP32-S3 boards */ +#endif + +#ifndef UART0_RXD +#define UART0_RXD (GPIO44) /**< RxD of UART_DEV(0) used on all ESP32-S3 boards */ +#endif +/** @} */ + +#ifdef __cplusplus +} /* end extern "C" */ +#endif + +#endif /* PERIPH_CONF_COMMON_ESP32S3_H */ +/** @} */