From b499befa9b37f32f03f953085cdb1a86ce9d3de7 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Tue, 19 May 2020 01:56:52 +0300 Subject: [PATCH] fix psram always init --- cores/esp32/esp32-hal-psram.h | 11 +++++++++++ cores/esp32/esp32-hal.h | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) 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();