Skip to content

Commit 27e61dc

Browse files
committed
fix psram always init
1 parent 7553683 commit 27e61dc

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

cores/esp32/esp32-hal-psram.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@
1919
extern "C" {
2020
#endif
2121

22+
#include "sdkconfig.h"
23+
24+
#ifndef BOARD_HAS_PSRAM
25+
#ifdef CONFIG_SPIRAM_SUPPORT
26+
#undef CONFIG_SPIRAM_SUPPORT
27+
#endif
28+
#ifdef CONFIG_SPIRAM
29+
#undef CONFIG_SPIRAM
30+
#endif
31+
#endif
32+
2233
bool psramInit();
2334
bool psramFound();
2435

cores/esp32/esp32-hal.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,6 @@ void yield(void);
7777
#include "esp32-hal-psram.h"
7878
#include "esp32-hal-cpu.h"
7979

80-
#ifndef BOARD_HAS_PSRAM
81-
#ifdef CONFIG_SPIRAM_SUPPORT
82-
#undef CONFIG_SPIRAM_SUPPORT
83-
#endif
84-
#endif
85-
8680
//returns chip temperature in Celsius
8781
float temperatureRead();
8882

0 commit comments

Comments
 (0)