Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C6 experiments #138

Draft
wants to merge 24 commits into
base: mdev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a68c1a8
ESP32-C6 buildenv
softhack007 Jun 13, 2024
931788f
bus manager: ledc (PWM) driver disabled for -C6
softhack007 Jun 13, 2024
b19902b
added WLED_NO_RMT_PIXELBUS for -C6
softhack007 Jun 13, 2024
246e2e9
workaround for network class naming conflict on -C6
softhack007 Jun 13, 2024
e843d8a
adding new type for -C6 (nodes overview, improv, info page)
softhack007 Jun 13, 2024
404c88c
-C6: rtc_get_reset_reason --> esp_rom_get_reset_reason()
softhack007 Jun 13, 2024
3bf3a25
pinmanager update for -C6
softhack007 Jun 13, 2024
784affd
several places where -C6 should be treated like -C3
softhack007 Jun 13, 2024
9fdb4c6
adding -C6 to github action builds
softhack007 Jun 13, 2024
1a66d6e
make non-C6 builds work again
softhack007 Jun 13, 2024
7b42a70
hack to make 8266 compile again
softhack007 Jun 13, 2024
6d4b611
fix for fix
softhack007 Jun 13, 2024
4ddead4
Update platformio.ini
softhack007 Jun 13, 2024
ee5f09a
Update platformio.ini
softhack007 Jun 13, 2024
af9cfae
ESP32-Chip_info does not yet support C6
softhack007 Jun 13, 2024
27617ec
Merge branch 'C6_experimental' of https://github.com/MoonModules/WLED…
softhack007 Jun 13, 2024
f21350d
Update platformio.ini
softhack007 Jun 13, 2024
3a13278
use full arduino framework
softhack007 Jun 13, 2024
d07fe96
use smaller littleFS for 4MB esp32-C6
softhack007 Jun 13, 2024
656d6ae
FASTLED_NO_FASTLED
softhack007 Jun 14, 2024
45ccab2
Update platformio.ini
softhack007 Jun 14, 2024
6cfb1f8
Merge branch 'mdev' into C6_experimental
softhack007 Jul 19, 2024
dc0371f
post-merge fixes
softhack007 Jul 19, 2024
5e160b8
upgrade to arduino 3.0.3
softhack007 Jul 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 85 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@
; default_envs = esp32c3dev
; default_envs = lolin_s2_mini
; default_envs = esp32s3dev_16MB_PSRAM_opi
; default_envs = esp32c6dev_8MB

; MoonModules entries
; ===================

default_envs =
esp32c6dev_8MB ;; highly experimental.
esp32c6dev_4MB ;; highly experimental.
esp32_4MB_S ;; experimental, optimized for speed
esp32_4MB_M ;; esp32 recommended default
esp32_4MB_M_eth
Expand Down Expand Up @@ -239,12 +242,14 @@ upload_speed = 115200
# ------------------------------------------------------------------------------
lib_compat_mode = strict
lib_deps =
fastled/FastLED @ 3.6.0
;; fastled/FastLED @ 3.6.0
https://github.com/softhack007/FastLED.git#ESP32-C6 ;; patched version needed for -C6
IRremoteESP8266 @ 2.8.2
;;makuna/NeoPixelBus @ 2.7.5 ;; WLEDMM will be added in board specific sections
;;https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.7
;; https://github.com/lost-hope/ESPAsyncWebServer.git#master ;; WLEDMM to display .log and .wled files in /edit
https://github.com/Aircoookie/ESPAsyncWebServer.git @ 2.2.1 ;; newer with bugfixes and stability improvements
;; https://github.com/Aircoookie/ESPAsyncWebServer.git @ 2.2.1 ;; newer with bugfixes and stability improvements
https://github.com/softhack007/ESPAsyncWebServer.git#ESP32-C6 ;; patched version needed for -C6
#For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line
#TFT_eSPI
#For compatible OLED display uncomment following
Expand Down Expand Up @@ -442,6 +447,84 @@ lib_deps =
;; makuna/NeoPixelBus @ 2.7.9 ;; experimental
${env.lib_deps}


[esp32c6]
;; generic definitions for all ESP32-C6 boards
;;platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.06.10/platform-espressif32.zip
platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.07.11/platform-espressif32.zip
;;platform_packages =
platform_packages =
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#3.0.3
framework-arduinoespressif32-libs @ https://github.com/espressif/arduino-esp32/releases/download/3.0.3/esp32-arduino-libs-3.0.3.zip

board = esp32-c6-devkitm-1
build_flags = -g
-DESP32
-DARDUINO_ARCH_ESP32
-DARDUINO_ARCH_ESP32C6
-DCONFIG_IDF_TARGET_ESP32C6=1
-D CONFIG_ASYNC_TCP_USE_WDT=0
-DCO
-DESP32_ARDUINO_NO_RGB_BUILTIN ;; avoids RMT driver abort on startup "E (98) rmt(legacy): CONFLICT! driver_ng is not allowed to be used with the legacy driver"
-DARDUINO_USB_MODE=1 ;; this flag is mandatory for ESP32-C3
;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry:
;; ARDUINO_USB_CDC_ON_BOOT
-DFASTLED_NO_FASTLED ;; disable the global "FastLED" object (avoids crash at startup)
lib_deps =
;;https://github.com/pbolduc/AsyncTCP.git @ 1.2.0
https://github.com/softhack007/AsyncTCP.git#ESP32-C6 ;; patched version needed for -C6
makuna/NeoPixelBus @ 2.8.0 ;; latest version neeeded for -C6
${env.lib_deps}


[env:esp32c6dev_8MB]
;; ESP32-C6 "devkit C" with 8MB flash
extends = esp32c6
platform = ${esp32c6.platform}
platform_packages = ${esp32c6.platform_packages}
framework = arduino
board = esp32-c6-devkitc-1
;;build_type = debug

build_unflags = ${common.build_unflags}
;; -D CORE_DEBUG_LEVEL=0
;; -D NDEBUG
build_flags = ${common.build_flags} ${esp32c6.build_flags} -D WLED_RELEASE_NAME=ESP32-C6_8MB
-Wno-volatile ;; -Wno-deprecated-declarations ;; silence compiler warnings
;; -Wno-cpp ;; silence '#pragma warning' messages
;; -D DEBUG -g3 -ggdb
;; -D CORE_DEBUG_LEVEL=4
;; -D WLED_DEBUG
-D WLED_WATCHDOG_TIMEOUT=0
;; -DLOLIN_WIFI_FIX ; might be needed on "-C6 mini"
;;-DARDUINO_USB_CDC_ON_BOOT=1 ;; for virtual CDC USB
-DARDUINO_USB_CDC_ON_BOOT=0 ;; for serial-to-USB chip
-D WLED_DISABLE_INFRARED ;; library not not compatible with -C6
-D WLED_DISABLE_ESPNOW ;; not sure if this will work
-D WLED_DISABLE_ALEXA ;; compile errors
;;-D WLED_DISABLE_WEBSOCKETS ;; not sure if this will work (hacks needed in asyncWebserver)
-D BTNPIN=9
-D LEDPIN=8
upload_speed = 460800
lib_deps = ${esp32c6.lib_deps}
lib_ignore =
IRremoteESP8266 ; use with WLED_DISABLE_INFRARED for faster compilation

board_build.partitions = ${esp32.large_partitions}
board_build.f_flash = 80000000L
board_build.flash_mode = qio
;; board_build.arduino.memory_type = qio_qspi
monitor_filters = esp32_exception_decoder

[env:esp32c6dev_4MB]
;; ESP32-C6 "devkit M" with 4MB flash
extends = env:esp32c6dev_8MB
board = esp32-c6-devkitm-1
board_build.partitions = ${esp32.big_partitions}
build_unflags = ${env:esp32c6dev_8MB.build_unflags} -D WLED_RELEASE_NAME=ESP32-C6_8MB
build_flags = ${env:esp32c6dev_8MB.build_flags} -D WLED_RELEASE_NAME=ESP32-C6_4MB


[esp32s3]
;; generic definitions for all ESP32-S3 boards
platform = espressif32@ ~6.3.2
Expand Down
2 changes: 1 addition & 1 deletion wled00/FX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7449,7 +7449,7 @@ uint16_t mode_freqmap(void) { // Map FFT_MajorPeak to SEGLEN.
uint16_t pixCol = (log10f(FFT_MajorPeak) - 1.78f) * 255.0f/(MAX_FREQ_LOG10 - 1.78f); // Scale log10 of frequency values to the 255 colour index.
if (FFT_MajorPeak < 61.0f) pixCol = 0; // handle underflow

#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C6)
uint16_t bright = (int) (sqrtf(my_magnitude)*16.0f); // WLEDMM sqrt scaling, to make peaks more prominent
#else
uint16_t bright = (int)my_magnitude;
Expand Down
1 change: 1 addition & 0 deletions wled00/NodeStruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#define NODE_TYPE_ID_ESP32S2 33
#define NODE_TYPE_ID_ESP32S3 34
#define NODE_TYPE_ID_ESP32C3 35
#define NODE_TYPE_ID_ESP32C6 36

/*********************************************************************************************\
* NodeStruct
Expand Down
6 changes: 6 additions & 0 deletions wled00/bus_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ BusPwm::BusPwm(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWhite) {
uint8_t numPins = NUM_PWM_PINS(bc.type);
_frequency = bc.frequency ? bc.frequency : WLED_PWM_FREQ;

#if !defined(CONFIG_IDF_TARGET_ESP32C6) // PWM (ledc) not yet working, due to breaking changes in new API
#ifdef ESP8266
analogWriteRange(255); //same range as one RGB channel
analogWriteFreq(_frequency);
Expand Down Expand Up @@ -261,6 +262,7 @@ BusPwm::BusPwm(BusConfig &bc) : Bus(bc.type, bc.start, bc.autoWhite) {
USER_PRINTLN("] ");
reversed = bc.reversed;
_valid = true;
#endif
}

void BusPwm::setPixelColor(uint16_t pix, uint32_t c) {
Expand Down Expand Up @@ -344,6 +346,7 @@ uint32_t BusPwm::getPixelColor(uint16_t pix) {

void BusPwm::show() {
if (!_valid) return;
#if !defined(CONFIG_IDF_TARGET_ESP32C6) // PWM (ledc) not yet working, due to breaking changes in new API
uint8_t numPins = NUM_PWM_PINS(_type);
for (uint8_t i = 0; i < numPins; i++) {
uint8_t scaled = (_data[i] * _bri) / 255;
Expand All @@ -354,6 +357,7 @@ void BusPwm::show() {
ledcWrite(_ledcStart + i, scaled);
#endif
}
#endif
}

uint8_t BusPwm::getPins(uint8_t* pinArray) {
Expand All @@ -370,11 +374,13 @@ void BusPwm::deallocatePins() {
for (uint8_t i = 0; i < numPins; i++) {
pinManager.deallocatePin(_pins[i], PinOwner::BusPwm);
if (!pinManager.isPinOk(_pins[i])) continue;
#if !defined(CONFIG_IDF_TARGET_ESP32C6) // PWM (ledc) not yet working, due to breaking changes in new API
#ifdef ESP8266
digitalWrite(_pins[i], LOW); //turn off PWM interrupt
#else
if (_ledcStart < 16) ledcDetachPin(_pins[i]);
#endif
#endif
}
#ifdef ARDUINO_ARCH_ESP32
pinManager.deallocateLedc(_ledcStart, numPins);
Expand Down
71 changes: 67 additions & 4 deletions wled00/bus_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@
// https://github.com/Makuna/NeoPixelBus/blob/b32f719e95ef3c35c46da5c99538017ef925c026/src/internal/Esp32_i2s.h#L4
// https://github.com/Makuna/NeoPixelBus/blob/b32f719e95ef3c35c46da5c99538017ef925c026/src/internal/NeoEsp32RmtMethod.h#L857

#if !defined(WLED_NO_I2S0_PIXELBUS) && (defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3))
#if !defined(WLED_NO_I2S0_PIXELBUS) && (defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6))
#define WLED_NO_I2S0_PIXELBUS
#endif
#if !defined(WLED_NO_I2S1_PIXELBUS) && (defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S2))
#if !defined(WLED_NO_I2S1_PIXELBUS) && (defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32S2))
#define WLED_NO_I2S1_PIXELBUS
#endif

#if !defined(WLED_NO_RMT_PIXELBUS) && defined(CONFIG_IDF_TARGET_ESP32C6) // NPB only supports BitBang on -C6 at the moment
#define WLED_NO_RMT_PIXELBUS
#endif

// temporary end

// WLEDMM TroyHacks support - SLOWPATH has priority over TWOPATH
Expand Down Expand Up @@ -186,25 +191,37 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca
/*** ESP32 Neopixel methods ***/
#ifdef ARDUINO_ARCH_ESP32
//RGB
#if defined(WLED_NO_RMT_PIXELBUS)
#define B_32_RN_NEO_3 NeoPixelBusLg<NeoGrbFeature, NeoEsp32BitBangWs2812xMethod, NeoGammaNullMethod>
#else
#define B_32_RN_NEO_3 NeoPixelBusLg<NeoGrbFeature, NeoEsp32RmtNWs2812xMethod, NeoGammaNullMethod>
#endif
#ifndef WLED_NO_I2S0_PIXELBUS
#define B_32_I0_NEO_3 NeoPixelBusLg<NeoGrbFeature, NeoEsp32I2s0800KbpsMethod, NeoGammaNullMethod>
#endif
#ifndef WLED_NO_I2S1_PIXELBUS
#define B_32_I1_NEO_3 NeoPixelBusLg<NeoGrbFeature, NeoEsp32I2s1800KbpsMethod, NeoGammaNullMethod>
#endif
//#define B_32_BB_NEO_3 NeoPixelBrightnessBus<NeoGrbFeature, NeoEsp32BitBang800KbpsMethod> // NeoEsp8266BitBang800KbpsMethod
//#define B_32_BB_NEO_3 NeoPixelBusLg<NeoGrbFeature, NeoEsp32BitBang800KbpsMethod, NeoGammaNullMethod> // NeoEsp8266BitBang800KbpsMethod
//RGBW
#if defined(WLED_NO_RMT_PIXELBUS)
#define B_32_RN_NEO_4 NeoPixelBusLg<NeoGrbwFeature, NeoEsp32BitBangWs2812xMethod, NeoGammaNullMethod>
#else
#define B_32_RN_NEO_4 NeoPixelBusLg<NeoGrbwFeature, NeoEsp32RmtNWs2812xMethod, NeoGammaNullMethod>
#endif
#ifndef WLED_NO_I2S0_PIXELBUS
#define B_32_I0_NEO_4 NeoPixelBusLg<NeoGrbwFeature, NeoEsp32I2s0800KbpsMethod, NeoGammaNullMethod>
#endif
#ifndef WLED_NO_I2S1_PIXELBUS
#define B_32_I1_NEO_4 NeoPixelBusLg<NeoGrbwFeature, NeoEsp32I2s1800KbpsMethod, NeoGammaNullMethod>
#endif
//#define B_32_BB_NEO_4 NeoPixelBrightnessBus<NeoGrbwFeature, NeoEsp32BitBang800KbpsMethod> // NeoEsp8266BitBang800KbpsMethod
//#define B_32_BB_NEO_4 NeoPixelBusLg<NeoGrbwFeature, NeoEsp32BitBang800KbpsMethod, NeoGammaNullMethod> // NeoEsp8266BitBang800KbpsMethod
//400Kbps
#if defined(WLED_NO_RMT_PIXELBUS)
#define B_32_RN_400_3 NeoPixelBusLg<NeoGrbFeature, NeoEsp32BitBang400KbpsMethod, NeoGammaNullMethod>
#else
#define B_32_RN_400_3 NeoPixelBusLg<NeoGrbFeature, NeoEsp32RmtN400KbpsMethod, NeoGammaNullMethod>
#endif
#ifndef WLED_NO_I2S0_PIXELBUS
#define B_32_I0_400_3 NeoPixelBusLg<NeoGrbFeature, NeoEsp32I2s0400KbpsMethod, NeoGammaNullMethod>
#endif
Expand All @@ -213,7 +230,11 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca
#endif
//#define B_32_BB_400_3 NeoPixelBrightnessBus<NeoGrbFeature, NeoEsp32BitBang400KbpsMethod> // NeoEsp8266BitBang400KbpsMethod
//TM1814 (RGBW)
#if defined(WLED_NO_RMT_PIXELBUS)
#define B_32_RN_TM1_4 NeoPixelBusLg<NeoWrgbTm1814Feature, NeoEsp32BitBangTm1814Method, NeoGammaNullMethod>
#else
#define B_32_RN_TM1_4 NeoPixelBusLg<NeoWrgbTm1814Feature, NeoEsp32RmtNTm1814Method, NeoGammaNullMethod>
#endif
#ifndef WLED_NO_I2S0_PIXELBUS
#define B_32_I0_TM1_4 NeoPixelBusLg<NeoWrgbTm1814Feature, NeoEsp32I2s0Tm1814Method, NeoGammaNullMethod>
#endif
Expand All @@ -222,7 +243,11 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca
#endif
//Bit Bang theoratically possible, but very undesirable and not needed (no pin restrictions on RMT and I2S)
//TM1829 (RGB)
#if defined(WLED_NO_RMT_PIXELBUS)
#define B_32_RN_TM2_3 NeoPixelBusLg<NeoBrgFeature, NeoEsp32BitBangTm1829Method, NeoGammaNullMethod>
#else
#define B_32_RN_TM2_3 NeoPixelBusLg<NeoBrgFeature, NeoEsp32RmtNTm1829Method, NeoGammaNullMethod>
#endif
#ifndef WLED_NO_I2S0_PIXELBUS
#define B_32_I0_TM2_3 NeoPixelBusLg<NeoBrgFeature, NeoEsp32I2s0Tm1829Method, NeoGammaNullMethod>
#endif
Expand All @@ -231,7 +256,11 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca
#endif
//Bit Bang theoratically possible, but very undesirable and not needed (no pin restrictions on RMT and I2S)
//UCS8903
#if defined(WLED_NO_RMT_PIXELBUS)
#define B_32_RN_UCS_3 NeoPixelBusLg<NeoRgbUcs8903Feature, NeoEsp32BitBangWs2812xMethod, NeoGammaNullMethod>
#else
#define B_32_RN_UCS_3 NeoPixelBusLg<NeoRgbUcs8903Feature, NeoEsp32RmtNWs2812xMethod, NeoGammaNullMethod>
#endif
#ifndef WLED_NO_I2S0_PIXELBUS
#define B_32_I0_UCS_3 NeoPixelBusLg<NeoRgbUcs8903Feature, NeoEsp32I2s0800KbpsMethod, NeoGammaNullMethod>
#endif
Expand All @@ -240,7 +269,11 @@ bool canUseSerial(void); // WLEDMM (wled_serial.cpp) returns true if Serial ca
#endif
//Bit Bang theoratically possible, but very undesirable and not needed (no pin restrictions on RMT and I2S)
//UCS8904
#if defined(WLED_NO_RMT_PIXELBUS)
#define B_32_RN_UCS_4 NeoPixelBusLg<NeoRgbwUcs8904Feature, NeoEsp32BitBangWs2812xMethod, NeoGammaNullMethod>
#else
#define B_32_RN_UCS_4 NeoPixelBusLg<NeoRgbwUcs8904Feature, NeoEsp32RmtNWs2812xMethod, NeoGammaNullMethod>
#endif
#ifndef WLED_NO_I2S0_PIXELBUS
#define B_32_I0_UCS_4 NeoPixelBusLg<NeoRgbwUcs8904Feature, NeoEsp32I2s0800KbpsMethod, NeoGammaNullMethod>
#endif
Expand Down Expand Up @@ -456,32 +489,49 @@ class PolyBus {
case I_8266_BB_UCS_4: busPtr = new B_8266_BB_UCS_4(len, pins[0]); break;
#endif
#ifdef ARDUINO_ARCH_ESP32
#if defined(WLED_NO_RMT_PIXELBUS)
case I_32_RN_NEO_3: busPtr = new B_32_RN_NEO_3(len, pins[0]); USER_PRINT("(BitBang) "); break;
#else
case I_32_RN_NEO_3: busPtr = new B_32_RN_NEO_3(len, pins[0], (NeoBusChannel)channel); USER_PRINTF("(RMT #%u) ", channel); break;
#endif
#ifndef WLED_NO_I2S0_PIXELBUS
case I_32_I0_NEO_3: busPtr = new B_32_I0_NEO_3(len, pins[0]); USER_PRINT("(I2S #0) "); break;
#endif
#ifndef WLED_NO_I2S1_PIXELBUS
case I_32_I1_NEO_3: busPtr = new B_32_I1_NEO_3(len, pins[0]); USER_PRINT("(I2S #1) "); break;
#endif
// case I_32_BB_NEO_3: busPtr = new B_32_BB_NEO_3(len, pins[0], (NeoBusChannel)channel); break;
#if defined(WLED_NO_RMT_PIXELBUS)
case I_32_RN_NEO_4: busPtr = new B_32_RN_NEO_4(len, pins[0]); USER_PRINT("(RGBW BitBang) "); break;
#else
case I_32_RN_NEO_4: busPtr = new B_32_RN_NEO_4(len, pins[0], (NeoBusChannel)channel); USER_PRINTF("(RGBW RMT #%u) ", channel); break;
#endif
#ifndef WLED_NO_I2S0_PIXELBUS
case I_32_I0_NEO_4: busPtr = new B_32_I0_NEO_4(len, pins[0]); USER_PRINT("(RGBW I2S #0) "); break;
#endif
#ifndef WLED_NO_I2S1_PIXELBUS
case I_32_I1_NEO_4: busPtr = new B_32_I1_NEO_4(len, pins[0]); USER_PRINT("(RGBW I2S #1) "); break;
#endif
// case I_32_BB_NEO_4: busPtr = new B_32_BB_NEO_4(len, pins[0], (NeoBusChannel)channel); break;
#if defined(WLED_NO_RMT_PIXELBUS)
case I_32_RN_400_3: busPtr = new B_32_RN_400_3(len, pins[0]); break;
#else
case I_32_RN_400_3: busPtr = new B_32_RN_400_3(len, pins[0], (NeoBusChannel)channel); break;
#endif
#ifndef WLED_NO_I2S0_PIXELBUS
case I_32_I0_400_3: busPtr = new B_32_I0_400_3(len, pins[0]); break;
#endif
#ifndef WLED_NO_I2S1_PIXELBUS
case I_32_I1_400_3: busPtr = new B_32_I1_400_3(len, pins[0]); break;
#endif
// case I_32_BB_400_3: busPtr = new B_32_BB_400_3(len, pins[0], (NeoBusChannel)channel); break;
#if defined(WLED_NO_RMT_PIXELBUS)
case I_32_RN_TM1_4: busPtr = new B_32_RN_TM1_4(len, pins[0]); break;
case I_32_RN_TM2_3: busPtr = new B_32_RN_TM2_3(len, pins[0]); break;
#else
case I_32_RN_TM1_4: busPtr = new B_32_RN_TM1_4(len, pins[0], (NeoBusChannel)channel); break;
case I_32_RN_TM2_3: busPtr = new B_32_RN_TM2_3(len, pins[0], (NeoBusChannel)channel); break;
#endif
#ifndef WLED_NO_I2S0_PIXELBUS
case I_32_I0_TM1_4: busPtr = new B_32_I0_TM1_4(len, pins[0]); break;
case I_32_I0_TM2_3: busPtr = new B_32_I0_TM2_3(len, pins[0]); break;
Expand All @@ -490,15 +540,23 @@ class PolyBus {
case I_32_I1_TM1_4: busPtr = new B_32_I1_TM1_4(len, pins[0]); break;
case I_32_I1_TM2_3: busPtr = new B_32_I1_TM2_3(len, pins[0]); break;
#endif
#if defined(WLED_NO_RMT_PIXELBUS)
case I_32_RN_UCS_3: busPtr = new B_32_RN_UCS_3(len, pins[0]); break;
#else
case I_32_RN_UCS_3: busPtr = new B_32_RN_UCS_3(len, pins[0], (NeoBusChannel)channel); break;
#endif
#ifndef WLED_NO_I2S0_PIXELBUS
case I_32_I0_UCS_3: busPtr = new B_32_I0_UCS_3(len, pins[0]); break;
#endif
#ifndef WLED_NO_I2S1_PIXELBUS
case I_32_I1_UCS_3: busPtr = new B_32_I1_UCS_3(len, pins[0]); break;
#endif
// case I_32_BB_UCS_3: busPtr = new B_32_BB_UCS_3(len, pins[0], (NeoBusChannel)channel); break;
#if defined(WLED_NO_RMT_PIXELBUS)
case I_32_RN_UCS_4: busPtr = new B_32_RN_UCS_4(len, pins[0]); break;
#else
case I_32_RN_UCS_4: busPtr = new B_32_RN_UCS_4(len, pins[0], (NeoBusChannel)channel); break;
#endif
#ifndef WLED_NO_I2S0_PIXELBUS
case I_32_I0_UCS_4: busPtr = new B_32_I0_UCS_4(len, pins[0]); break;
#endif
Expand Down Expand Up @@ -1205,6 +1263,11 @@ class PolyBus {
// On ESP32-C3 only the first 2 RMT channels are usable for transmitting
if (num > 1) return I_NONE;
//if (num > 1) offset = 1; // I2S not supported yet (only 1 I2S)
#elif defined(CONFIG_IDF_TARGET_ESP32C6)
// toDo: double-check everything is the same -C3
// On ESP32-C6 only the first 2 RMT channels are usable for transmitting
if (num > 1) return I_NONE;
//if (num > 1) offset = 1; // I2S not supported yet (only 1 I2S)
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
// On ESP32-S3 only the first 4 RMT channels are usable for transmitting
if (num > 3) return I_NONE;
Expand Down
2 changes: 1 addition & 1 deletion wled00/button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ bool isButtonPressed(uint8_t i)
if (digitalRead(pin) == HIGH) return true;
break;
case BTN_TYPE_TOUCH:
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3)
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C6)
if (touchRead(pin) <= touchThreshold) return true;
#endif
break;
Expand Down
Loading
Loading