Fix max bus limits for C3, S2 & S3

This commit is contained in:
Blaž Kristan 2022-10-11 09:46:48 +02:00
parent 426635871b
commit 37a4a4dcdf
2 changed files with 13 additions and 10 deletions

View File

@ -25,16 +25,24 @@
#ifdef ESP8266
#define WLED_MAX_BUSSES 3
#else
#if defined(CONFIG_IDF_TARGET_ESP32C3)
#if defined(CONFIG_IDF_TARGET_ESP32C3) // 2 RMT, only has 1 I2S but NPB does not support it ATM
#define WLED_MAX_BUSSES 2
#elif defined(CONFIG_IDF_TARGET_ESP32S2)
#define WLED_MAX_BUSSES 5
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
#elif defined(CONFIG_IDF_TARGET_ESP32S2) // 4 RMT, only has 1 I2S bus, supported in NPB
#if defined(USERMOD_AUDIOREACTIVE) // requested by @softhack007 https://github.com/blazoncek/WLED/issues/33
#define WLED_MAX_BUSSES 4
#else
#define WLED_MAX_BUSSES 5
#endif
#elif defined(CONFIG_IDF_TARGET_ESP32S3) // 4 RMT, has 2 I2S but NPB does not support them ATM
#define WLED_MAX_BUSSES 4
#else
#if defined(USERMOD_AUDIOREACTIVE) // requested by @softhack007 https://github.com/blazoncek/WLED/issues/33
#define WLED_MAX_BUSSES 8
#else
#define WLED_MAX_BUSSES 10
#endif
#endif
#endif
#endif
#ifndef WLED_MAX_BUTTONS

View File

@ -367,12 +367,7 @@ void getSettingsJS(byte subPage, char* dest)
// set limits
oappend(SET_F("bLimits("));
#if defined(ESP32) && defined(USERMOD_AUDIOREACTIVE) && !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32S3) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// requested by @softhack007 https://github.com/blazoncek/WLED/issues/33
oappend(itoa(WLED_MAX_BUSSES-2,nS,10)); oappend(","); // prevent use of I2S buses if audio installed. ESP32-S3 currently does not support these busses.
#else
oappend(itoa(WLED_MAX_BUSSES,nS,10)); oappend(",");
#endif
oappend(itoa(MAX_LEDS_PER_BUS,nS,10)); oappend(",");
oappend(itoa(MAX_LED_MEMORY,nS,10)); oappend(",");
oappend(itoa(MAX_LEDS,nS,10));