fix I2C pin alloc, and prep for settngs decluttering

ES7243: fix I2C pin alloc (multi-pin)
AR settings: prepare for de-cluttering
This commit is contained in:
Frank
2022-11-19 16:38:53 +01:00
parent 37e88ef08a
commit a4ab3ee6f1
3 changed files with 19 additions and 12 deletions

View File

@@ -1853,16 +1853,16 @@ class AudioReactive : public Usermod {
oappend(SET_F("addOption(dd,'Send',1);"));
oappend(SET_F("addOption(dd,'Receive',2);"));
oappend(SET_F("addInfo('AudioReactive:digitalmic:type',1,'<i>requires reboot!</i>');")); // 0 is field type, 1 is actual field
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',0,'I2S Serial Data (SD / DATA / DOUT) ');"));
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',1,'I2S Left/Right Clock (WS / CLK / LRCK)');"));
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',2,'I2S Serial Clock (SCK / BCLK)');"));
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',0,'I2S Serial Data: SD / DOUT /DATA');"));
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',1,'I2S Left/Right Clock: WS / LRCK / CLK');"));
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',2,'I2S Serial Clock: SCK / BCLK');"));
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',3,'I2S Master CLK <br/><i>only use -1, 0, 1 or 3 for MCLK</i>');"));
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',3,'MCLK - I2S Master CLK<br/><i>only use -1, 0, 1 or 3 for MCLK</i>');"));
#else
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',3,'I2S Master CLK');"));
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',3,'MCLK - I2S Master CLK');"));
#endif
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',4,'I2C SDA');"));
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',5,'I2C SCL');"));
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',4,'ES7243 I2C: SDA');"));
oappend(SET_F("addInfo('AudioReactive:digitalmic:pin[]',5,'ES7243 I2C: SCL');"));
}