diff --git a/wled00/bus_manager.cpp b/wled00/bus_manager.cpp index 60925e1495..e2e28cebc0 100644 --- a/wled00/bus_manager.cpp +++ b/wled00/bus_manager.cpp @@ -1242,6 +1242,10 @@ void BusManager::removeAll() { // If enabled, RMT idle level is set to HIGH when off // to prevent leakage current when using an N-channel MOSFET to toggle LED power void BusManager::esp32RMTInvertIdle() { +#if defined(CONFIG_IDF_TARGET_ESP32C6) + // ESP32-C6 uses BitBang method, not RMT - nothing to do here + return; +#else bool idle_out; unsigned rmt = 0; unsigned u = 0; @@ -1272,6 +1276,7 @@ void BusManager::esp32RMTInvertIdle() { rmt_set_idle_level(ch, idle_out, lvl); u++; } +#endif } #endif diff --git a/wled00/network.cpp b/wled00/network.cpp index 174df1c631..4602faedcc 100644 --- a/wled00/network.cpp +++ b/wled00/network.cpp @@ -296,7 +296,7 @@ int findWiFi(bool doScan) { } else if (status >= 0) { // status contains number of found networks (including duplicate SSIDs with different BSSID) DEBUG_PRINTF_P(PSTR("WiFi: Found %d SSIDs. @ %lus\n"), status, millis()/1000); int rssi = -9999; - int selected = selectedWiFi; + size_t selected = (static_cast(selectedWiFi) < multiWiFi.size()) ? static_cast(selectedWiFi) : 0; // ensure valid starting index for (int o = 0; o < status; o++) { DEBUG_PRINTF_P(PSTR(" SSID: %s (BSSID: %s) RSSI: %ddB\n"), WiFi.SSID(o).c_str(), WiFi.BSSIDstr(o).c_str(), WiFi.RSSI(o)); for (unsigned n = 0; n < multiWiFi.size(); n++) diff --git a/wled00/pin_manager.cpp b/wled00/pin_manager.cpp index 709263e1a3..729e845039 100644 --- a/wled00/pin_manager.cpp +++ b/wled00/pin_manager.cpp @@ -232,6 +232,13 @@ bool PinManager::isPinOk(byte gpio, bool output) if (gpio > 21 && gpio < 33) return false; // 22 to 32: not connected + SPI FLASH // JTAG: GPIO39-42 are usually used for inline debugging // GPIO46 is input only and pulled down + #elif defined(CONFIG_IDF_TARGET_ESP32C6) + // strapping pins: 8, 9, 15 + // GPIO 0-23 directly usable, 24-30 are for SPI flash + if (gpio > 23 && gpio < 31) return false; // 24-30 SPI FLASH + #if ARDUINO_USB_CDC_ON_BOOT == 1 || ARDUINO_USB_DFU_ON_BOOT == 1 + if (gpio == 12 || gpio == 13) return false; // 12-13 USB-JTAG + #endif #else if ((strncmp_P(PSTR("ESP32-U4WDH"), ESP.getChipModel(), 11) == 0) || // this is the correct identifier, but....