mirror of
https://github.com/wled/WLED.git
synced 2025-07-16 07:16:31 +00:00
WLED_USE_PSRAM fix
This commit is contained in:
parent
8574bf9d98
commit
b7fb9e182b
@ -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
|
||||||
|
@ -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;
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user