8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36ff442 commit 1688b7cCopy full SHA for 1688b7c
cores/esp32/esp32-hal-adc.c
@@ -37,7 +37,7 @@ static uint8_t __analogVRefPin = 0;
37
#include "soc/rtc_io_reg.h"
38
#elif CONFIG_IDF_TARGET_ESP32C3
39
#include "esp32c3/rom/ets_sys.h"
40
-#else
+#else
41
#error Target CONFIG_IDF_TARGET is not supported
42
#endif
43
#else // ESP32 Before IDF 4.0
@@ -46,7 +46,11 @@ static uint8_t __analogVRefPin = 0;
46
47
48
static uint8_t __analogAttenuation = 3;//11db
49
-static uint8_t __analogWidth = 3;//12 bits
+#if CONFIG_IDF_TARGET_ESP32S2
50
+static uint8_t __analogWidth = 4; // 13 bits
51
52
+static uint8_t __analogWidth = 3; // 12 bits
53
+#endif
54
static uint8_t __analogClockDiv = 1;
55
static adc_attenuation_t __pin_attenuation[SOC_GPIO_PIN_COUNT];
56
0 commit comments