diff --git a/components/esp_rom/include/esp32s2beta/rom/opi_flash.h b/components/esp_rom/include/esp32s2beta/rom/opi_flash.h index ee2490bed4..bb209f67f0 100644 --- a/components/esp_rom/include/esp32s2beta/rom/opi_flash.h +++ b/components/esp_rom/include/esp32s2beta/rom/opi_flash.h @@ -10,6 +10,10 @@ #include #include "spi_flash.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef struct { uint16_t cmd; /*!< Command value */ uint16_t cmdBitLen; /*!< Command byte length*/ @@ -288,4 +292,8 @@ esp_rom_spiflash_result_t esp_rom_opiflash_write(int spi_num, esp_rom_spiflash_r void esp_rom_opiflash_set_mode(int spi_num, esp_rom_spiflash_read_mode_t cur_mode, esp_rom_spiflash_read_mode_t target_mode); #endif +#ifdef __cplusplus +} +#endif + #endif diff --git a/components/esp_rom/include/esp32s2beta/rom/spi_flash.h b/components/esp_rom/include/esp32s2beta/rom/spi_flash.h index 5d2a261fd8..f74926acdf 100644 --- a/components/esp_rom/include/esp32s2beta/rom/spi_flash.h +++ b/components/esp_rom/include/esp32s2beta/rom/spi_flash.h @@ -15,6 +15,10 @@ #ifndef _ROM_SPI_FLASH_H_ #define _ROM_SPI_FLASH_H_ +#ifndef CONFIG_IDF_TARGET_ESP32S2BETA +#error This file should only be included for ESP32-S2 target +#endif + #include #include diff --git a/tools/ci/check_public_headers_exceptions.txt b/tools/ci/check_public_headers_exceptions.txt index 111bc6639a..45d808c7ab 100644 --- a/tools/ci/check_public_headers_exceptions.txt +++ b/tools/ci/check_public_headers_exceptions.txt @@ -90,7 +90,6 @@ components/unity/include/unity_test_runner.h ### Here are the files that do not compile for some reason # -components/esp_rom/include/esp32s2beta/rom/spi_flash.h components/app_trace/include/esp_sysview_trace.h components/esp_gdbstub/include/esp_gdbstub.h components/openssl/include/platform/ssl_pm.h