Liu Song’s Projects


~/Projects/Tasmota

git clone https://code.lsong.org/Tasmota

Commit

Commit
05d589f2d74256419bb74688f08e721ebdcddaa1
Author
Theo Arends <11044339+[email protected]>
Date
2023-07-08 18:04:13 +0200 +0200
Diffstat
 tasmota/include/tasmota.h | 4 ++++

Set ESP32-C3 max supported ADC channels to 5


diff --git a/tasmota/include/tasmota.h b/tasmota/include/tasmota.h
index 9eae7a4093d04fe8f8e9b37956b9f41d99afd6b6..60ce13c13b246fae613c260cdea9e7a7521207c0 100644
--- a/tasmota/include/tasmota.h
+++ b/tasmota/include/tasmota.h
@@ -138,7 +138,11 @@ const uint8_t MAX_ADCS = 1;                 // Max number of ESP8266 ADC pins
 const uint8_t MAX_SWITCHES_TXT = 8;         // Max number of switches user text
 #endif  // ESP8266
 #ifdef ESP32
+#ifdef CONFIG_IDF_TARGET_ESP32C3
+const uint8_t MAX_ADCS = 5;                 // Max number of ESP32-C3 ADC pins (ADC2 pins are unusable with Wifi enabled)
+#else   // ESP32
 const uint8_t MAX_ADCS = 8;                 // Max number of ESP32 ADC pins (ADC2 pins are unusable with Wifi enabled)
+#endif  // ESP32C3
 const uint8_t MAX_SWITCHES_TXT = 28;        // Max number of switches user text
 #endif  // ESP32