Skip to content

Commit 832de97

Browse files
authored
Update includes for ESP32 target configurations
1 parent 72c641a commit 832de97

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cores/esp32/Esp.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ extern "C" {
4141
#include "hal/spi_flash_ll.h"
4242
#if CONFIG_IDF_TARGET_ESP32
4343
#include "soc/spi_struct.h"
44-
#elif CONFIG_IDF_TARGET_ESP32P4 || CONFIG_IDF_TARGET_ESP32C5
44+
#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2
4545
#include "hal/spimem_flash_ll.h"
46-
#include "soc/spi_mem_c_struct.h"
46+
#include "soc/spi_mem_struct.h"
4747
#else
48+
// ESP32-P4, ESP32-C5, and future chips use spi_mem_c_struct.h
4849
#include "hal/spimem_flash_ll.h"
49-
#include "soc/spi_mem_struct.h"
50+
#include "soc/spi_mem_c_struct.h"
5051
#endif
5152

5253
#ifdef ESP_IDF_VERSION_MAJOR // IDF 4+

0 commit comments

Comments
 (0)