Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
9649125
Disable other envs to save CI build time
netmindz Nov 8, 2025
0f10558
ESP32-C6 buildenv
softhack007 Jun 13, 2024
cf195af
build only esp32c6dev_4MB
netmindz Nov 8, 2025
db65e30
use esp32_idf_V5.platform
netmindz Nov 8, 2025
fa5aa58
Update platformio.ini
softhack007 Jun 13, 2024
152bfd1
Merge branch 'V5' into V5-C6
softhack007 Dec 1, 2025
1bc63ca
use the same lib_deps as the "main V5" branch
softhack007 Dec 1, 2025
6961059
minor changes for consistency with other build envs
softhack007 Dec 1, 2025
45d105e
Merge branch 'V5' into V5-C6
softhack007 Dec 1, 2025
b2d6591
disable QuickEspNow - seems incompatible with -C6
softhack007 Dec 1, 2025
62ca377
remove special FASTLED_NO_FASTLED hack
softhack007 Dec 1, 2025
7023545
treat C6 similar to C3
softhack007 Dec 1, 2025
1de36ca
more "C6 is like C3" adjustments
softhack007 Dec 1, 2025
2df4c58
disable touch button code on C6
softhack007 Dec 1, 2025
3f441f0
guess what ... more "C6 is like C3" ifdefs needed
softhack007 Dec 1, 2025
c73935d
small fix
softhack007 Dec 1, 2025
c096c5b
fix for old-style WLED_RELEASE_NAME
softhack007 Dec 1, 2025
5ecf76c
Merge branch 'V5' into V5-C6
softhack007 Dec 1, 2025
bc4b6b6
Merge branch 'V5' into V5-C6
softhack007 Dec 1, 2025
7b54be8
Merge branch 'V5' into V5-C6
softhack007 Dec 1, 2025
9f12301
esp32c6 inherits build_unflags and lib_ignore from V5 buildenv
softhack007 Dec 1, 2025
f88fd07
temporary workaround for #5145
softhack007 Dec 1, 2025
d3e92f2
Fix ESP32-C6 runtime crash and improve compatibility
karan-vk Nov 26, 2025
ec44fd1
Add ESP32-C6 pin validation for strapping and USB-JTAG pins
karan-vk Nov 26, 2025
c92abb8
Address PR comments: cleanup and safety improvements
karan-vk Nov 29, 2025
e4d6848
Revert .vscode/extensions.json
karan-vk Nov 29, 2025
d2c1313
Fully revert .vscode/extensions.json to base branch
karan-vk Nov 29, 2025
4ebbd86
Use Aircoookie/ESPAsyncWebServer v2.4.2 instead of softhack007 fork
karan-vk Nov 29, 2025
2f267a8
Merge pull request #5114 from karan-vk/esp32c6-fixes
softhack007 Jan 10, 2026
cf09c0d
Comment out '#pragma warning' suppression flag
softhack007 Feb 7, 2026
01b1c51
Add experimental ESP32-C5 support with WiFi 6 dual-band
jonny190 Feb 7, 2026
8268c4a
Applied changes based on comments on PR
jonny190 Feb 7, 2026
11f5be1
Removed Leftover file
jonny190 Feb 7, 2026
35706f0
Apply suggestion from @coderabbitai[bot] for WiFi band
netmindz Feb 7, 2026
5137768
Address PR review: pin pioarduino, fix I2S1 remap, simplify arch check
jonny190 Feb 7, 2026
d2e6a56
Use NeoPixelBus fork with ESP32-C5 bit-bang and I2S fixes
jonny190 Feb 7, 2026
1a025f5
Fix MAC address on ESP32-C5 and update NeoPixelBus fork
jonny190 Feb 8, 2026
f0acc62
Merge pull request #5355 from jonny190/ESP32-C5-V5
softhack007 Feb 8, 2026
83c37f8
Merge branch 'V5' into V5-C6
softhack007 Feb 8, 2026
6cefd14
fix C5 build error
softhack007 Feb 8, 2026
16262ee
platformio.ini: moving [esp32c5] upwards
softhack007 Feb 8, 2026
b2e0c24
simplify and correct some long ifdef chains
softhack007 Feb 8, 2026
a1a1905
simplify C5 buildenv
softhack007 Feb 8, 2026
a3a3547
adding [env:esp32c5dev_8MB_qspi]
softhack007 Feb 8, 2026
b860a1a
fix incorrect PSRAM warning on C5 and C6
softhack007 Feb 8, 2026
20dd750
alexa build error was already solved in V5 branch
softhack007 Feb 8, 2026
e9b1a53
PSRAM guard bugfix
softhack007 Feb 8, 2026
8b98a7a
future support: adding C61 and P4 to esp32RMTInvertIdle() guard
softhack007 Feb 8, 2026
0920f0f
extend some chip type guards for C6 and P4
softhack007 Feb 8, 2026
b30951e
C6 buildenv cleanup
softhack007 Feb 8, 2026
6b9f90c
remove outdated patched libs for C6
softhack007 Feb 8, 2026
3c24681
ifdef guards alignment
softhack007 Feb 8, 2026
9232bd4
correct straping pin comments in pinManager
softhack007 Feb 8, 2026
be49f34
add include guard for esp_mac.h
softhack007 Feb 8, 2026
1800a32
align index.js with chip types from nodestruct.h
softhack007 Feb 8, 2026
9d63296
fix debug delay condition in wled.cpp
softhack007 Feb 8, 2026
d7ab1f4
Merge branch 'V5' into V5-C6
softhack007 Feb 8, 2026
7370c10
remove dead (and dangerous) mutex macros in bus_manager.cpp (#5364)
softhack007 Feb 9, 2026
8159768
ToDO: research how to set PWM duty cycle and hpoint for dithering
softhack007 Feb 9, 2026
d8616e6
C5/C6 minor updates
softhack007 Feb 9, 2026
5b46b9c
experimental: enable 5Ghz WiFi on C5
softhack007 Feb 9, 2026
576e82b
report errors from 5Ghz wifi config
softhack007 Feb 9, 2026
e104529
move 5Ghz init after WiFi.mode(WIFI_STA)
softhack007 Feb 9, 2026
6e70d0c
clarification
softhack007 Feb 9, 2026
b72568f
ESP32-C5 does not support analog dithering (yet)
softhack007 Feb 10, 2026
d3251c5
Use Wifi class method to activate 5Ghz Wifi
softhack007 Feb 10, 2026
f02e6b6
proper wifi channel & band reporting
softhack007 Feb 10, 2026
b128585
fix compiler warning "comparing signed with unsigned is undefined beh…
softhack007 Feb 10, 2026
ab65e9f
C5: change NeoPixelBus reference to "wled-c5-stable" tag
softhack007 Feb 10, 2026
ed6b82b
repeat WiFi.setBandMode() in initConnection()
softhack007 Feb 10, 2026
7014d4f
nitpick: fixing another case of "comparing unsigned to integer is und…
softhack007 Feb 10, 2026
edf0cbe
adding wled_boards.h to reduce #if defined() .. clutter
softhack007 Feb 10, 2026
d823ab4
replace some very long if defined() chains with flags from wled_boards.h
softhack007 Feb 10, 2026
cd911ae
oopsie
softhack007 Feb 10, 2026
4f9c48f
consistency fix
softhack007 Feb 10, 2026
71cf78b
Merge branch 'V5' into V5-C6
softhack007 Feb 10, 2026
546384b
fixing minor errors
softhack007 Feb 10, 2026
1009855
shorten some more ifdef chains in wled.h
softhack007 Feb 10, 2026
c6739d3
ToDo: adjust Wi-Fi stregth to match value allowed by V5 framework
softhack007 Feb 10, 2026
08ca41b
expand chip-specific "if defined" to C61 and P4 (future support)
softhack007 Feb 10, 2026
a39285a
Add WiFi band preference for dual-band ESP32 chips (#5367)
jonny190 Feb 10, 2026
703b90f
Merge branch 'V5' into V5-C6
softhack007 Feb 10, 2026
f8df68c
tiny change
softhack007 Feb 10, 2026
b730ce8
removing another mega guard
softhack007 Feb 10, 2026
e046316
add channel to wifi scan result list (wifi settings)
softhack007 Feb 10, 2026
f8a6790
5Ghz wifi scanning
softhack007 Feb 10, 2026
55eee94
support higher Tx power (V5 only)
softhack007 Feb 10, 2026
46a1b2f
clarification
softhack007 Feb 10, 2026
ede8a14
ifdef fixes
softhack007 Feb 10, 2026
deaae11
missed one
softhack007 Feb 11, 2026
5e073ce
add esp-idf managed folders to .gitignore
softhack007 Feb 11, 2026
c1dddea
ermove duplicate extern references
softhack007 Feb 11, 2026
7ce497b
fix broken ifdef chain in wled.h
softhack007 Feb 11, 2026
967f6ab
Merge branch 'V5' into V5-C6
softhack007 Feb 12, 2026
3de117b
typo
softhack007 Feb 12, 2026
1bda0bf
Merge branch 'V5' into V5-C6
softhack007 Feb 12, 2026
acc98d4
Merge branch 'V5' into V5-C6
softhack007 Feb 14, 2026
cffc57e
make LED settings work, by pretending to be a c3
softhack007 Feb 20, 2026
a425b97
minor buildenv cleanup
softhack007 Feb 23, 2026
9959f75
(experimental) buildenv for P4
softhack007 Feb 23, 2026
2820331
16.0-V5alpha --> 16.0-alpha-V5
softhack007 Feb 23, 2026
2802f8c
adding monitor_filters
softhack007 Feb 23, 2026
0c6c66b
remove touchButtonISR() on boards that don't suport it
softhack007 Feb 24, 2026
ed0fadd
esp32-P4 pins (will clean up later)
softhack007 Feb 24, 2026
5c9803d
P4 buildenv update
softhack007 Feb 24, 2026
aadabe9
credits
softhack007 Feb 24, 2026
2123389
P4 buildenv update
softhack007 Feb 24, 2026
3abd8c7
P4: auto-update esp-hosted WiFi coprocessor
softhack007 Feb 24, 2026
491546b
typo's
softhack007 Feb 24, 2026
d3b8d96
more typos and comment corrections
softhack007 Feb 25, 2026
2ce3870
P4 does not have on-chip WiFi, use ETH MAC instead
softhack007 Feb 25, 2026
fb877ad
P4 buildenv update
softhack007 Feb 26, 2026
c76cb5c
dependancies update
softhack007 Feb 28, 2026
8fcdbe6
Merge branch 'V5' into V5-C6
softhack007 Feb 28, 2026
511ff78
Merge branch 'V5' into V5-C6
softhack007 Mar 1, 2026
fc313e1
pioarduino 55.03.37 (-C5 and -P4 only)
softhack007 Mar 1, 2026
d4b0360
bugfix: right shift on signed char is unsafe
softhack007 Mar 1, 2026
27a6fad
bugfix: prevent array bounds violations due to short WS payload data
softhack007 Mar 1, 2026
fc2ffed
-alpha-V5 --> -alphaV5
softhack007 Mar 1, 2026
2af98d4
build_unflags should always come from same origin as platform
softhack007 Mar 2, 2026
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
3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"pioarduino.pioarduino-ide",
"platformio.platformio-ide"
],
"unwantedRecommendations": [
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wled",
"version": "16.0.0-alpha-V5",
"version": "16.0.0-alphaV5",
"description": "Tools for WLED project",
"main": "tools/cdata.js",
"directories": {
Expand Down
11 changes: 6 additions & 5 deletions pio-scripts/set_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,16 @@ def add_wled_metadata_flags(env, node):
if not has_def(cdefs, "WLED_REPO"):
repo = get_github_repo()
if repo:
print(f"repo = {repo}")
cdefs.append(("WLED_REPO", f"\\\"{repo}\\\""))

cdefs.append(("WLED_VERSION", WLED_VERSION))

# This transforms the node in to a Builder; it cannot be modified again
return env.Object(
node,
CPPDEFINES=cdefs
)
# Return the node unmodified - middleware should not create new build targets
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ToDO: this is a temporary hack - the root cause is solved in the latest pioarduino (and tasmota, too?). Remember to revert this change once we upgrade to latest platform packages.

print(f"version = {WLED_VERSION}")
# Instead, modify the environment's CPPDEFINES before the file is compiled
env["CPPDEFINES"] = cdefs
return node

env.AddBuildMiddleware(
add_wled_metadata_flags,
Expand Down
241 changes: 227 additions & 14 deletions platformio.ini

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions usermods/audioreactive/audio_reactive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ class AudioReactive : public Usermod {
static const char _dynamics[];
static const char _frequency[];
static const char _inputLvl[];
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
#if defined(CONFIG_IDF_TARGET_ESP32) // analog mic is only supported on classic esp32
static const char _analogmic[];
#endif
static const char _digitalmic[];
Expand Down Expand Up @@ -1160,23 +1160,23 @@ class AudioReactive : public Usermod {

// Reset I2S peripheral for good measure
i2s_driver_uninstall(I2S_NUM_0); // E (696) I2S: i2s_driver_uninstall(2006): I2S port 0 has not installed
#if !defined(CONFIG_IDF_TARGET_ESP32C3)
#if !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C5)
delay(100);
periph_module_reset(PERIPH_I2S0_MODULE); // not possible on -C3
#endif
Comment on lines +1163 to 1166
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

echo "=== Checking platformio.ini for ESP32-C6 environments ==="
grep -n -i 'c6\|esp32c6' platformio.ini | head -20

echo ""
echo "=== Checking if audioreactive is excluded for any boards ==="
grep -n -A2 -B2 'audioreactive' platformio.ini | head -30

echo ""
echo "=== Searching for existing CONFIG_IDF_TARGET_ESP32C6 in codebase ==="
find . -name "*.cpp" -o -name "*.h" | xargs grep -l "CONFIG_IDF_TARGET_ESP32C6" | head -10

echo ""
echo "=== Checking audio_reactive.cpp for any C6 mentions ==="
grep -n "C6\|c6" usermods/audioreactive/audio_reactive.cpp

echo ""
echo "=== Check if there are any guards using C6 anywhere ==="
rg "CONFIG_IDF_TARGET_ESP32C6" -t cpp -t h --max-count 20

Repository: wled/WLED

Length of output: 10066


🏁 Script executed:

#!/bin/bash

echo "=== Checking what changed in this PR (if git available) ==="
git log --oneline -1 2>/dev/null || echo "Git info not available"

echo ""
echo "=== Look at the specific lines mentioned in review (1163-1166) ==="
sed -n '1160,1170p' usermods/audioreactive/audio_reactive.cpp

echo ""
echo "=== Check broader pattern - all lines with CONFIG_IDF_TARGET_ESP32C3 in audio_reactive.cpp ==="
grep -n "CONFIG_IDF_TARGET_ESP32C3" usermods/audioreactive/audio_reactive.cpp

Repository: wled/WLED

Length of output: 3096


🏁 Script executed:

#!/bin/bash

echo "=== Check if ESP32-C6 is used in any other usermods ==="
find usermods -name "*.cpp" -o -name "*.h" | xargs grep -l "CONFIG_IDF_TARGET_ESP32C6" 2>/dev/null

echo ""
echo "=== Check main WLED code for C6 support patterns ==="
find wled00 -name "*.cpp" -o -name "*.h" | xargs grep -l "CONFIG_IDF_TARGET_ESP32C6" 2>/dev/null | head -10

echo ""
echo "=== Check if there are peripheral reset guards for C6 elsewhere ==="
rg "PERIPH_I2S0_MODULE" -A2 -B2 --max-count 10

Repository: wled/WLED

Length of output: 944


Add ESP32-C6 to all guards that exclude C3 and C5 in this file.

The audioreactive usermod is inconsistent with itself: audio_source.h includes C6 guards, but audio_reactive.cpp does not. C6 is a RISC-V chip like C3/C5 and lacks the same peripherals (PERIPH_I2S0_MODULE reset, analog ADC over I2S, PDM support). Since C6 build support exists in platformio.ini and is properly guarded elsewhere in WLED, the missing C6 checks here will cause failures if someone enables audioreactive for C6.

Add !defined(CONFIG_IDF_TARGET_ESP32C6) to all exclusion guards and defined(CONFIG_IDF_TARGET_ESP32C6) to all inclusion guards throughout this file, matching the pattern used for C3 and C5.

πŸ€– Prompt for AI Agents
In `@usermods/audioreactive/audio_reactive.cpp` around lines 1163 - 1166, The
guards around peripheral/feature-specific code (e.g., the block calling
delay(100) and periph_module_reset(PERIPH_I2S0_MODULE)) must also exclude
ESP32-C6 like C3/C5; update all conditional compilation checks in this file to
add !defined(CONFIG_IDF_TARGET_ESP32C6) where you currently have
!defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C5), and
add defined(CONFIG_IDF_TARGET_ESP32C6) to any inclusion guards that mirror C3/C5
patterns so the file matches audio_source.h's handling of C6.

delay(100); // Give that poor microphone some time to setup.

useBandPassFilter = false;

#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C5)
if ((i2sckPin == I2S_PIN_NO_CHANGE) && (i2ssdPin >= 0) && (i2swsPin >= 0) && ((dmType == 1) || (dmType == 4)) ) dmType = 5; // dummy user support: SCK == -1 --means--> PDM microphone
#endif

switch (dmType) {
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C5) || defined(CONFIG_IDF_TARGET_ESP32S3)
// stub cases for not-yet-supported I2S modes on other ESP32 chips
case 0: //ADC analog
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3)
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C5)
case 5: //PDM Microphone
#endif
#endif
Expand Down Expand Up @@ -1204,7 +1204,7 @@ class AudioReactive : public Usermod {
delay(100);
if (audioSource) audioSource->initialize(i2swsPin, i2ssdPin, i2sckPin, mclkPin);
break;
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C5)
case 5:
DEBUGSR_PRINT(F("AR: I2S PDM Microphone - ")); DEBUGSR_PRINTLN(F(I2S_PDM_MIC_CHANNEL_TEXT));
audioSource = new I2SSource(SAMPLE_RATE, BLOCK_SIZE, 1.0f/4.0f);
Expand All @@ -1220,7 +1220,7 @@ class AudioReactive : public Usermod {
if (audioSource) audioSource->initialize(i2swsPin, i2ssdPin, i2sckPin, mclkPin);
break;

#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C5) && !defined(CONFIG_IDF_TARGET_ESP32S3)
// ADC over I2S is only possible on "classic" ESP32
case 0:
DEBUGSR_PRINTLN(F("AR: Analog Microphone (left channel only)."));
Expand Down Expand Up @@ -1797,7 +1797,7 @@ class AudioReactive : public Usermod {
top[FPSTR(_addPalettes)] = addPalettes;

#ifdef ARDUINO_ARCH_ESP32
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C5) && !defined(CONFIG_IDF_TARGET_ESP32S3)
JsonObject amic = top.createNestedObject(FPSTR(_analogmic));
amic["pin"] = audioPin;
#endif
Expand Down Expand Up @@ -1856,16 +1856,16 @@ class AudioReactive : public Usermod {
configComplete &= getJsonValue(top[FPSTR(_addPalettes)], addPalettes);

#ifdef ARDUINO_ARCH_ESP32
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C5) && !defined(CONFIG_IDF_TARGET_ESP32S3)
configComplete &= getJsonValue(top[FPSTR(_analogmic)]["pin"], audioPin);
#else
audioPin = -1; // MCU does not support analog mic
#endif

configComplete &= getJsonValue(top[FPSTR(_digitalmic)]["type"], dmType);
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C5) || defined(CONFIG_IDF_TARGET_ESP32S3)
if (dmType == 0) dmType = SR_DMTYPE; // MCU does not support analog
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3)
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C5)
if (dmType == 5) dmType = SR_DMTYPE; // MCU does not support PDM
#endif
#endif
Expand Down Expand Up @@ -1903,14 +1903,14 @@ class AudioReactive : public Usermod {
#ifdef ARDUINO_ARCH_ESP32
uiScript.print(F("uxp=ux+':digitalmic:pin[]';")); // uxp = shortcut for AudioReactive:digitalmic:pin[]
uiScript.print(F("dd=addDropdown(ux,'digitalmic:type');"));
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C5) && !defined(CONFIG_IDF_TARGET_ESP32S3)
uiScript.print(F("addOption(dd,'Generic Analog',0);"));
#endif
uiScript.print(F("addOption(dd,'Generic I2S',1);"));
uiScript.print(F("addOption(dd,'ES7243',2);"));
uiScript.print(F("addOption(dd,'SPH0654',3);"));
uiScript.print(F("addOption(dd,'Generic I2S with Mclk',4);"));
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C5)
uiScript.print(F("addOption(dd,'Generic I2S PDM',5);"));
#endif
uiScript.print(F("addOption(dd,'ES8388',6);"));
Expand Down Expand Up @@ -1946,7 +1946,7 @@ class AudioReactive : public Usermod {
uiScript.print(F("addInfo(uxp,0,'<i>sd/data/dout</i>','I2S SD');"));
uiScript.print(F("addInfo(uxp,1,'<i>ws/clk/lrck</i>','I2S WS');"));
uiScript.print(F("addInfo(uxp,2,'<i>sck/bclk</i>','I2S SCK');"));
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C5) && !defined(CONFIG_IDF_TARGET_ESP32S3)
uiScript.print(F("addInfo(uxp,3,'<i>only use -1, 0, 1 or 3</i>','I2S MCLK');"));
#else
uiScript.print(F("addInfo(uxp,3,'<i>master clock</i>','I2S MCLK');"));
Expand Down Expand Up @@ -2069,7 +2069,7 @@ const char AudioReactive::_config[] PROGMEM = "config";
const char AudioReactive::_dynamics[] PROGMEM = "dynamics";
const char AudioReactive::_frequency[] PROGMEM = "frequency";
const char AudioReactive::_inputLvl[] PROGMEM = "inputLevel";
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32C5) && !defined(CONFIG_IDF_TARGET_ESP32S3)
const char AudioReactive::_analogmic[] PROGMEM = "analogmic";
#endif
const char AudioReactive::_digitalmic[] PROGMEM = "digitalmic";
Expand Down
2 changes: 1 addition & 1 deletion usermods/audioreactive/audio_source.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

// see https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/chip-series-comparison.html#related-documents
// and https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/i2s.html#overview-of-all-modes
#if defined(CONFIG_IDF_TARGET_ESP32C2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C5) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2) || defined(ESP8266) || defined(ESP8265)
#if defined(CONFIG_IDF_TARGET_ESP32C2) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C5) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32C61) || defined(CONFIG_IDF_TARGET_ESP32H2) || defined(ESP8266) || defined(ESP8265)
// there are two things in these MCUs that could lead to problems with audio processing:
// * no floating point hardware (FPU) support - FFT uses float calculations. If done in software, a strong slow-down can be expected (between 8x and 20x)
// * single core, so FFT task might slow down other things like LED updates
Expand Down
10 changes: 6 additions & 4 deletions wled00/FX.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ extern byte realtimeMode; // used in getMappedPixelIndex()
#define WLED_FPS 42
#define FRAMETIME_FIXED (1000/WLED_FPS)
#define FRAMETIME strip.getFrameTime()
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S2)
#define MIN_FRAME_DELAY 2 // minimum wait between repaints, to keep other functions like WiFi alive
#elif defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3)
#define MIN_FRAME_DELAY 3 // S2/C3 are slower than normal esp32, and only have one core
#if defined(ARDUINO_ARCH_ESP32)
#if (SOC_CPU_CORES_NUM < 2)
#define MIN_FRAME_DELAY 3 // S2/C3/C6/C5 are slower than normal esp32, and only have one core
#else
#define MIN_FRAME_DELAY 2 // classic esp32/S3/P4: minimum wait between repaints, to keep other functions like WiFi alive
#endif
#else
#define MIN_FRAME_DELAY 8 // 8266 legacy MIN_SHOW_DELAY
#endif
Expand Down
10 changes: 5 additions & 5 deletions wled00/FX_fcn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ void WS2812FX::finalizeInit() {
BusManager::removeAll();

unsigned digitalCount = 0;
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3)
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_HAS_PARALLEL_I2S)
// determine if it is sensible to use parallel I2S outputs on ESP32 (i.e. more than 5 outputs = 1 I2S + 4 RMT)
unsigned maxLedsOnBus = 0;
unsigned busType = 0;
Expand Down Expand Up @@ -1191,7 +1191,7 @@ void WS2812FX::finalizeInit() {
bool use_placeholder = false;
unsigned busMemUsage = bus.memUsage(Bus::isDigital(bus.type) && !Bus::is2Pin(bus.type) ? digitalCount++ : 0); // does not include DMA/RMT buffer
// estimate maximum I2S memory usage (only relevant for digital non-2pin busses)
#if !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(ESP8266)
#if defined(WLED_HAS_PARALLEL_I2S)
#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S3)
const bool usesI2S = ((useParallelI2S && digitalCount <= 8) || (!useParallelI2S && digitalCount == 1));
#elif defined(CONFIG_IDF_TARGET_ESP32S2)
Expand Down Expand Up @@ -1336,8 +1336,8 @@ static uint8_t _add (uint8_t a, uint8_t b) { unsigned t = a + b; return t
static uint8_t _subtract (uint8_t a, uint8_t b) { return b > a ? (b - a) : 0; }
static uint8_t _difference(uint8_t a, uint8_t b) { return b > a ? (b - a) : (a - b); }
static uint8_t _average (uint8_t a, uint8_t b) { return (a + b) >> 1; }
#if defined(ESP8266) || defined(CONFIG_IDF_TARGET_ESP32C3)
static uint8_t _multiply (uint8_t a, uint8_t b) { return ((a * b) + 255) >> 8; } // faster than division on C3 but slightly less accurate
#if !defined(WLED_HAVE_FAST_int_DIVIDE)
static uint8_t _multiply (uint8_t a, uint8_t b) { return ((a * b) + 255) >> 8; } // faster than division on C3/C5 but slightly less accurate
#else
static uint8_t _multiply (uint8_t a, uint8_t b) { return (a * b) / 255; } // origianl uses a & b in range [0,1]
#endif
Expand All @@ -1347,7 +1347,7 @@ static uint8_t _darken (uint8_t a, uint8_t b) { return a < b ? a : b; }
static uint8_t _screen (uint8_t a, uint8_t b) { return 255 - _multiply(~a,~b); } // 255 - (255-a)*(255-b)/255
static uint8_t _overlay (uint8_t a, uint8_t b) { return b < 128 ? 2 * _multiply(a,b) : (255 - 2 * _multiply(~a,~b)); }
static uint8_t _hardlight (uint8_t a, uint8_t b) { return a < 128 ? 2 * _multiply(a,b) : (255 - 2 * _multiply(~a,~b)); }
#if defined(ESP8266) || defined(CONFIG_IDF_TARGET_ESP32C3)
#if !defined(WLED_HAVE_FAST_int_DIVIDE)
static uint8_t _softlight (uint8_t a, uint8_t b) { return (((b * b * (255 - 2 * a))) + ((2 * a * b + 256) << 8)) >> 16; } // Pegtop's formula (1 - 2a)b^2
#else
static uint8_t _softlight (uint8_t a, uint8_t b) { return (b * b * (255 - 2 * a) + 255 * 2 * a * b) / (255 * 255); } // Pegtop's formula (1 - 2a)b^2 + 2ab
Expand Down
Loading