post-merge
* restore WLED_USE_PSRAM_JSON - not existing in upstream * fix compiler warning about ambiguous "&"
This commit is contained in:
@@ -25,6 +25,7 @@ void handleDDPPacket(e131_packet_t* p) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WLEDMM this line seems very wrong - anything & 0b00111000 cannot have the last 3 bits set .... also there is a compiler warning "suggest parentheses around comparison in operand of '&'"
|
||||||
uint8_t ddpChannelsPerLed = (p->dataType & 0b00111000 == 0b011) ? 4 : 3; // data type 0x1B (formerly 0x1A) is RGBW (type 3, 8 bit/channel)
|
uint8_t ddpChannelsPerLed = (p->dataType & 0b00111000 == 0b011) ? 4 : 3; // data type 0x1B (formerly 0x1A) is RGBW (type 3, 8 bit/channel)
|
||||||
|
|
||||||
uint32_t start = htonl(p->channelOffset) / ddpChannelsPerLed;
|
uint32_t start = htonl(p->channelOffset) / ddpChannelsPerLed;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ static void doSaveState() {
|
|||||||
size_t len = measureJson(*fileDoc) + 1;
|
size_t len = measureJson(*fileDoc) + 1;
|
||||||
DEBUG_PRINTLN(len);
|
DEBUG_PRINTLN(len);
|
||||||
// if possible use SPI RAM on ESP32
|
// if possible use SPI RAM on ESP32
|
||||||
#if defined(BOARD_HAS_PSRAM) && defined(WLED_USE_PSRAM)
|
#if defined(BOARD_HAS_PSRAM) && (defined(WLED_USE_PSRAM) || defined(WLED_USE_PSRAM_JSON)) // WLEDMM
|
||||||
if (psramFound())
|
if (psramFound())
|
||||||
tmpRAMbuffer = (char*) ps_malloc(len);
|
tmpRAMbuffer = (char*) ps_malloc(len);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -485,7 +485,7 @@ void WLED::setup()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP32) && defined(BOARD_HAS_PSRAM)
|
#if defined(ARDUINO_ARCH_ESP32) && defined(BOARD_HAS_PSRAM)
|
||||||
psramInit(); //WLEDMM??
|
//psramInit(); //WLEDMM?? softhack007: not sure if explicit init is really needed ... lets disable it here and see if that works
|
||||||
#if defined(CONFIG_IDF_TARGET_ESP32S3)
|
#if defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||||
// S3: reserve GPIO 33-37 for "octal" PSRAM
|
// S3: reserve GPIO 33-37 for "octal" PSRAM
|
||||||
managed_pin_type pins[] = { {33, true}, {34, true}, {35, true}, {36, true}, {37, true} };
|
managed_pin_type pins[] = { {33, true}, {34, true}, {35, true}, {36, true}, {37, true} };
|
||||||
@@ -503,7 +503,7 @@ void WLED::setup()
|
|||||||
managed_pin_type pins[] = { {16, true}, {17, true} };
|
managed_pin_type pins[] = { {16, true}, {17, true} };
|
||||||
pinManager.allocateMultiplePins(pins, sizeof(pins)/sizeof(managed_pin_type), PinOwner::SPI_RAM);
|
pinManager.allocateMultiplePins(pins, sizeof(pins)/sizeof(managed_pin_type), PinOwner::SPI_RAM);
|
||||||
#endif
|
#endif
|
||||||
#if defined(WLED_USE_PSRAM)
|
#if defined(BOARD_HAS_PSRAM) && (defined(WLED_USE_PSRAM) || defined(WLED_USE_PSRAM_JSON)) // WLEDMM
|
||||||
if (psramFound()) {
|
if (psramFound()) {
|
||||||
DEBUG_PRINT(F("Total PSRAM: ")); DEBUG_PRINT(ESP.getPsramSize()/1024); DEBUG_PRINTLN("kB");
|
DEBUG_PRINT(F("Total PSRAM: ")); DEBUG_PRINT(ESP.getPsramSize()/1024); DEBUG_PRINTLN("kB");
|
||||||
DEBUG_PRINT(F("Free PSRAM : ")); DEBUG_PRINT(ESP.getFreePsram()/1024); DEBUG_PRINTLN("kB");
|
DEBUG_PRINT(F("Free PSRAM : ")); DEBUG_PRINT(ESP.getFreePsram()/1024); DEBUG_PRINTLN("kB");
|
||||||
|
|||||||
@@ -146,7 +146,7 @@
|
|||||||
// The following is a construct to enable code to compile without it.
|
// The following is a construct to enable code to compile without it.
|
||||||
// There is a code thet will still not use PSRAM though:
|
// There is a code thet will still not use PSRAM though:
|
||||||
// AsyncJsonResponse is a derived class that implements DynamicJsonDocument (AsyncJson-v6.h)
|
// AsyncJsonResponse is a derived class that implements DynamicJsonDocument (AsyncJson-v6.h)
|
||||||
#if defined(ARDUINO_ARCH_ESP32) && defined(BOARD_HAS_PSRAM) && defined(WLED_USE_PSRAM)
|
#if defined(ARDUINO_ARCH_ESP32) && defined(BOARD_HAS_PSRAM) && (defined(WLED_USE_PSRAM) || defined(WLED_USE_PSRAM_JSON)) // WLEDMM
|
||||||
struct PSRAM_Allocator {
|
struct PSRAM_Allocator {
|
||||||
void* allocate(size_t size) {
|
void* allocate(size_t size) {
|
||||||
if (psramFound()) return ps_malloc(size); // use PSRAM if it exists
|
if (psramFound()) return ps_malloc(size); // use PSRAM if it exists
|
||||||
|
|||||||
Reference in New Issue
Block a user