File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 15
15
*/
16
16
17
17
#include " Wippersnapper_AnalogIO.h"
18
- #include " Wippersnapper.h"
19
18
20
19
/* **********************************************************************************/
21
20
/* !
@@ -89,7 +88,11 @@ void Wippersnapper_AnalogIO::setADCResolution(int resolution) {
89
88
_nativeResolution = 12 ;
90
89
#elif defined(ARDUINO_ARCH_ESP32)
91
90
scaleAnalogRead = true ; // probably should be false, handled in bsp
92
- _nativeResolution = 13 ; // S3 ADC is 13-bit, others are 12-bit
91
+ #if defined(ESP32S3)
92
+ _nativeResolution = 13 ; // S3 ADC is 13-bit, others are 12-bit
93
+ #else
94
+ _nativeResolution = 12 ;
95
+ #endif
93
96
#elif defined(ARDUINO_ARCH_RP2040)
94
97
scaleAnalogRead = true ;
95
98
_nativeResolution = 10 ;
@@ -233,10 +236,8 @@ uint16_t Wippersnapper_AnalogIO::getPinValue(int pin) {
233
236
/* *********************************************************/
234
237
float Wippersnapper_AnalogIO::getPinValueVolts (int pin) {
235
238
#ifdef ARDUINO_ARCH_ESP32
236
- WS_DEBUG_PRINTLN (" ESP32: Using analogReadMilliVolts()" );
237
239
return analogReadMilliVolts (pin) / 1000.0 ;
238
240
#else
239
- WS_DEBUG_PRINTLN (" Using old getPinValueVolts()" );
240
241
uint16_t rawValue = getPinValue (pin);
241
242
return rawValue * getAref () / 65536 ;
242
243
#endif
You can’t perform that action at this time.
0 commit comments