diff --git a/cores/esp32/esp32-hal-psram.h b/cores/esp32/esp32-hal-psram.h index 36acc0a0..0ba6763c 100644 --- a/cores/esp32/esp32-hal-psram.h +++ b/cores/esp32/esp32-hal-psram.h @@ -19,6 +19,17 @@ extern "C" { #endif +#include "sdkconfig.h" + +#ifndef BOARD_HAS_PSRAM +#ifdef CONFIG_SPIRAM_SUPPORT +#undef CONFIG_SPIRAM_SUPPORT +#endif +#ifdef CONFIG_SPIRAM +#undef CONFIG_SPIRAM +#endif +#endif + bool psramInit(); bool psramFound(); diff --git a/cores/esp32/esp32-hal.h b/cores/esp32/esp32-hal.h index f42bae93..2f84e453 100644 --- a/cores/esp32/esp32-hal.h +++ b/cores/esp32/esp32-hal.h @@ -77,12 +77,6 @@ void yield(void); #include "esp32-hal-psram.h" #include "esp32-hal-cpu.h" -#ifndef BOARD_HAS_PSRAM -#ifdef CONFIG_SPIRAM_SUPPORT -#undef CONFIG_SPIRAM_SUPPORT -#endif -#endif - //returns chip temperature in Celsius float temperatureRead();