Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards/esp*: complete SD Card MTD config #19255

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions boards/common/esp32/include/board_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ extern "C" {
/** Pointer to the default MTD drive structure */
extern mtd_dev_t *mtd0;

/**
* @brief MTD offset for SD Card interfaces
*
* MTD_1 is used for SD Card.
*/
#ifndef CONFIG_SDCARD_GENERIC_MTD_OFFSET
#define CONFIG_SDCARD_GENERIC_MTD_OFFSET 1
#endif

/** @} */
#endif /* MODULE_MTD || DOXYGEN */

Expand Down
9 changes: 9 additions & 0 deletions boards/common/esp32c3/include/board_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ extern "C" {
/** Pointer to the default MTD drive structure */
extern mtd_dev_t *mtd0;

/**
* @brief MTD offset for SD Card interfaces
*
* MTD_1 is used for SD Card.
*/
#ifndef CONFIG_SDCARD_GENERIC_MTD_OFFSET
#define CONFIG_SDCARD_GENERIC_MTD_OFFSET 1
#endif

/** @} */
#endif /* MODULE_MTD || DOXYGEN */

Expand Down
9 changes: 9 additions & 0 deletions boards/common/esp32s2/include/board_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ extern "C" {
/** Pointer to the default MTD drive structure */
extern mtd_dev_t *mtd0;

/**
* @brief MTD offset for SD Card interfaces
*
* MTD_1 is used for SD Card.
*/
#ifndef CONFIG_SDCARD_GENERIC_MTD_OFFSET
#define CONFIG_SDCARD_GENERIC_MTD_OFFSET 1
#endif

/** @} */
#endif /* MODULE_MTD || DOXYGEN */

Expand Down
9 changes: 9 additions & 0 deletions boards/common/esp32s3/include/board_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ extern "C" {
/** Pointer to the default MTD drive structure */
extern mtd_dev_t *mtd0;

/**
* @brief MTD offset for SD Card interfaces
*
* MTD_1 is used for SD Card.
*/
#ifndef CONFIG_SDCARD_GENERIC_MTD_OFFSET
#define CONFIG_SDCARD_GENERIC_MTD_OFFSET 1
#endif

/** @} */
#endif /* MODULE_MTD || DOXYGEN */

Expand Down
9 changes: 9 additions & 0 deletions boards/common/esp8266/include/board_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ extern "C" {
/** Pointer to the default MTD device structure */
extern mtd_dev_t *mtd0;

/**
* @brief MTD offset for SD Card interfaces
*
* MTD_1 is used for SD Card.
*/
#ifndef CONFIG_SDCARD_GENERIC_MTD_OFFSET
#define CONFIG_SDCARD_GENERIC_MTD_OFFSET 1
#endif

/** @} */
#endif /* defined(MODULE_MTD) || defined(DOXYGEN) */

Expand Down
4 changes: 4 additions & 0 deletions boards/esp32-wemos-lolin-d32-pro/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@ config BOARD_ESP32_WEMOS_LOLIN_D32_PRO
select HAS_PERIPH_I2C
select HAS_PERIPH_PWM
select HAS_PERIPH_SPI
select HAS_SDCARD_SPI

select HAVE_MTD_SDCARD_DEFAULT
select MODULE_FATFS_VFS if MODULE_VFS_DEFAULT

source "$(RIOTBOARD)/common/esp32/Kconfig"
10 changes: 10 additions & 0 deletions boards/esp32-wemos-lolin-d32-pro/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
ifneq (,$(filter mtd,$(USEMODULE)))
USEMODULE += mtd_sdcard_default
endif

# default to using fatfs on SD card
ifneq (,$(filter vfs_default,$(USEMODULE)))
USEMODULE += fatfs_vfs
USEMODULE += mtd
endif

include $(RIOTBOARD)/common/esp32/Makefile.dep
1 change: 1 addition & 0 deletions boards/esp32-wemos-lolin-d32-pro/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ FEATURES_PROVIDED += periph_dac
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += sdcard_spi

FEATURES_PROVIDED += arduino
2 changes: 2 additions & 0 deletions boards/esp32-wrover-kit/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,7 @@ config BOARD_ESP32_WROVER_KIT
select HAS_SDCARD_SPI

select HAVE_ILI9341
select HAVE_MTD_SDCARD_DEFAULT
select MODULE_FATFS_VFS if MODULE_VFS_DEFAULT

source "$(RIOTBOARD)/common/esp32/Kconfig"
10 changes: 10 additions & 0 deletions boards/esp32-wrover-kit/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,14 @@ endif
# Sets up configuration for openocd
USEMODULE += esp_jtag

ifneq (,$(filter mtd,$(USEMODULE)))
USEMODULE += mtd_sdcard_default
endif

# default to using fatfs on SD card
ifneq (,$(filter vfs_default,$(USEMODULE)))
USEMODULE += fatfs_vfs
USEMODULE += mtd
endif

include $(RIOTBOARD)/common/esp32/Makefile.dep