pinDropDown: make reserved and read only aware and disable if needed
AudioReactive: add disableROPins on WS, SCK, MCLK and SCL
4LD: add disableROPins on CLK
settingsum:
- addfield: max 49 pins, if (global interface) also disabled, rename if to global, show 🔴 if pin claimed
- add disableROPins
- pinDropdownsPost
- rename SDA to if:SDA (etc) so it is part of claimed pins (also in set.cpp and xml.cpp)
xml.cpp:
- appendGPIOinfo(): get rsvd and ro_gpio from pinManager.isPinOk instead of hardcoded
- getSettingsJS: add pinDropdownsPost
This commit is contained in:
@@ -2105,14 +2105,17 @@ class AudioReactive : public Usermod {
|
||||
oappend(SET_F("xOption('AudioReactive:digitalmic:pin[]',0,' ⎌',")); oappendi(I2S_SDPIN); oappend(");");
|
||||
#endif
|
||||
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',1,'<i>ws/clk/lrck</i>','I2S WS');"));
|
||||
oappend(SET_F("disableROPins('AudioReactive:digitalmic:pin[]',1);"));
|
||||
#ifdef I2S_WSPIN
|
||||
oappend(SET_F("xOption('AudioReactive:digitalmic:pin[]',1,' ⎌',")); oappendi(I2S_WSPIN); oappend(");");
|
||||
#endif
|
||||
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',2,'<i>sck/bclk</i>','I2S SCK');"));
|
||||
oappend(SET_F("disableROPins('AudioReactive:digitalmic:pin[]',2);"));
|
||||
#ifdef I2S_CKPIN
|
||||
oappend(SET_F("xOption('AudioReactive:digitalmic:pin[]',2,' ⎌',")); oappendi(I2S_CKPIN); oappend(");");
|
||||
#endif
|
||||
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',3,'<i>master clock</i>','I2S MCLK');"));
|
||||
oappend(SET_F("disableROPins('AudioReactive:digitalmic:pin[]',3);"));
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||
oappend(SET_F("dOptions('AudioReactive:digitalmic:pin[]',3,2,2);")); //only use -1, 0, 1 or 3
|
||||
oappend(SET_F("dOptions('AudioReactive:digitalmic:pin[]',3,4,39);")); //only use -1, 0, 1 or 3
|
||||
@@ -2121,6 +2124,7 @@ class AudioReactive : public Usermod {
|
||||
oappend(SET_F("rOption('AudioReactive:digitalmic:pin[]',4,'use global (")); oappendi(i2c_sda); oappend(")',-1);");
|
||||
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',5,'','I2C SCL');"));
|
||||
oappend(SET_F("rOption('AudioReactive:digitalmic:pin[]',5,'use global (")); oappendi(i2c_scl); oappend(")',-1);");
|
||||
oappend(SET_F("disableROPins('AudioReactive:digitalmic:pin[]',5);"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1058,6 +1058,7 @@ class FourLineDisplayUsermod : public Usermod {
|
||||
bool isSPI = (type == SSD1306_SPI || type == SSD1306_SPI64);
|
||||
// WLEDMM add defaults
|
||||
oappend(SET_F("addInfo('4LineDisplay:pin[]',0,'','I2C/SPI CLK');"));
|
||||
oappend(SET_F("disableROPins('4LineDisplay::pin[]',0);"));
|
||||
#ifdef FLD_PIN_SCL
|
||||
oappend(SET_F("xOption('4LineDisplay:pin[]',0,' ⎌',")); oappendi(FLD_PIN_SCL); oappend(");");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user