-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
19432: boards/esp32: deduplication in common ESP32x board definitions r=benpicco a=gschorcht ### Contribution description The PR reduced code duplication in `boards/common/esp32*`. The PR moves the header files from `boards/common/esp32s3/include` that can be used for all types of ESP32x SoCs to a new common ESP32x board definition which is then included by all common ESP32x board definitions. ### Testing procedure Green CI. ### Issues/PRs references 19461: drivers/enc28j60: fix ISR routine and bth r=benpicco a=peteut Co-authored-by: Gunar Schorcht <[email protected]> Co-authored-by: Alain Péteut <[email protected]>
- Loading branch information
Showing
49 changed files
with
408 additions
and
2,179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
MODULE = boards_common_esp32 | ||
|
||
DIRS = $(RIOTBOARD)/common/esp32x | ||
|
||
include $(RIOTBASE)/Makefile.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
USEMODULE += boards_common_esp32 | ||
|
||
ifneq (,$(filter saul_default,$(USEMODULE))) | ||
USEMODULE += saul_gpio | ||
endif | ||
include $(RIOTBOARD)/common/esp32x/Makefile.dep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
CPU = esp32 | ||
CPU_FAM = esp32 | ||
|
||
# additional features provided by all boards is at least one UART | ||
FEATURES_PROVIDED += periph_uart | ||
include $(RIOTBOARD)/common/esp32x/Makefile.features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# configure the serial interface | ||
PORT_LINUX ?= /dev/ttyUSB0 | ||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) | ||
INCLUDES += -I$(RIOTBOARD)/common/esp32/include | ||
|
||
include $(RIOTBOARD)/common/esp32x/Makefile.include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright (C) 2018 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_esp32 | ||
* @brief Board definitions that are common for all ESP32 boards. | ||
* | ||
* This file contains board configurations that are valid for all ESP32. | ||
* | ||
* For detailed information about the configuration of ESP32 boards, see | ||
* section \ref esp32_peripherals "Common Peripherals". | ||
* | ||
* @author Gunar Schorcht <[email protected]> | ||
* @file | ||
* @{ | ||
*/ | ||
|
||
#ifndef BOARD_COMMON_ESP32_H | ||
#define BOARD_COMMON_ESP32_H | ||
|
||
#include "board_common.h" | ||
|
||
/** | ||
* @brief External clock crystal frequency (MHz) | ||
* | ||
* Most boards use a 40MHz crystal, including all those based on Espressif's | ||
* WROOM-32 and WROVER-32 modules. Those that don't, like the SparkFun ESP32 | ||
* Thing (26MHz), must define ESP32_XTAL_FREQ appropriately in their board | ||
* configuration. | ||
* | ||
* An obvious side effect of a mismatch is that the UART won't sync and the | ||
* development terminal will show garbage instead of log output. | ||
*/ | ||
#ifndef ESP32_XTAL_FREQ | ||
#define ESP32_XTAL_FREQ (40) | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
} /* end extern "C" */ | ||
#endif | ||
|
||
#endif /* BOARD_COMMON_ESP32_H */ | ||
/** @} */ |
Oops, something went wrong.