s3: better handling of PSRAM pins
This commit is contained in:
@@ -594,9 +594,11 @@ void WLED::setup()
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(BOARD_HAS_PSRAM)
|
||||
//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)
|
||||
// S3: reserve GPIO 33-37 for "octal" PSRAM
|
||||
managed_pin_type pins[] = { {33, true}, {34, true}, {35, true}, {36, true}, {37, true} };
|
||||
pinManager.allocateMultiplePins(pins, sizeof(pins)/sizeof(managed_pin_type), PinOwner::SPI_RAM);
|
||||
#if CONFIG_SPIRAM_MODE_OCT && defined(BOARD_HAS_PSRAM)
|
||||
// S3: reserve GPIO 33-37 for "octal" PSRAM
|
||||
managed_pin_type pins[] = { {33, true}, {34, true}, {35, true}, {36, true}, {37, true} };
|
||||
pinManager.allocateMultiplePins(pins, sizeof(pins)/sizeof(managed_pin_type), PinOwner::SPI_RAM);
|
||||
#endif
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
// S2: reserve GPIO 26-32 for PSRAM (may fail due to isPinOk() but that will also prevent other allocation)
|
||||
//managed_pin_type pins[] = { {26, true}, {27, true}, {28, true}, {29, true}, {30, true}, {31, true}, {32, true} };
|
||||
@@ -815,7 +817,11 @@ void WLED::setup()
|
||||
USER_PRINTLN(F("\nGPIO\t| Assigned to\t\t| Info"));
|
||||
USER_PRINTLN(F("--------|-----------------------|------------"));
|
||||
for(int pinNr = 0; pinNr < WLED_NUM_PINS; pinNr++) { // 49 = highest PIN on ESP32-S3
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||
if((pinManager.isPinOk(pinNr, false)) || (pinNr > 18 && pinNr < 21)) { // softhack007: list USB pins
|
||||
#else
|
||||
if(pinManager.isPinOk(pinNr, false)) {
|
||||
#endif
|
||||
//if ((!pinManager.isPinAllocated(pinNr)) && (pinManager.getPinSpecialText(pinNr).length() == 0)) continue; // un-comment to hide no-name,unused GPIO pins
|
||||
bool is_inOut = pinManager.isPinOk(pinNr, true);
|
||||
#if 0 // for testing
|
||||
|
||||
Reference in New Issue
Block a user