WLED_USE_PSRAM fix

This commit is contained in:
Blaz Kristan 2021-06-16 12:19:16 +02:00
parent 8574bf9d98
commit b7fb9e182b
3 changed files with 3 additions and 3 deletions

View File

@ -331,7 +331,7 @@ class WS2812FX {
deallocateData(); deallocateData();
if (WS2812FX::instance->_usedSegmentData + len > MAX_SEGMENT_DATA) return false; //not enough memory if (WS2812FX::instance->_usedSegmentData + len > MAX_SEGMENT_DATA) return false; //not enough memory
// if possible use SPI RAM on ESP32 // if possible use SPI RAM on ESP32
#ifdef ARDUINO_ARCH_ESP32 #ifdef ARDUINO_ARCH_ESP32 && defined(WLED_USE_PSRAM)
if (psramFound()) if (psramFound())
data = (byte*) ps_malloc(len); data = (byte*) ps_malloc(len);
else else

View File

@ -594,7 +594,7 @@ void serializeInfo(JsonObject root)
#endif #endif
root[F("freeheap")] = ESP.getFreeHeap(); root[F("freeheap")] = ESP.getFreeHeap();
#ifdef ARDUINO_ARCH_ESP32 #ifdef ARDUINO_ARCH_ESP32 && defined(WLED_USE_PSRAM)
if (psramFound()) root[F("psram")] = ESP.getFreePsram(); if (psramFound()) root[F("psram")] = ESP.getFreePsram();
#endif #endif
root[F("uptime")] = millis()/1000 + rolloverMillis*4294967; root[F("uptime")] = millis()/1000 + rolloverMillis*4294967;

View File

@ -311,7 +311,7 @@ void getSettingsJS(byte subPage, char* dest)
#ifdef WLED_DEBUG #ifdef WLED_DEBUG
oappend(SET_F(",1")); // debug output (TX) pin oappend(SET_F(",1")); // debug output (TX) pin
#endif #endif
#ifdef ARDUINO_ARCH_ESP32 #ifdef ARDUINO_ARCH_ESP32 && defined(WLED_USE_PSRAM)
if (psramFound()) oappend(SET_F(",16,17")); // GPIO16 & GPIO17 reserved for SPI RAM if (psramFound()) oappend(SET_F(",16,17")); // GPIO16 & GPIO17 reserved for SPI RAM
#endif #endif
//TODO: add reservations for Ethernet shield pins //TODO: add reservations for Ethernet shield pins