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 1515 */
1616
1717#include " Wippersnapper_AnalogIO.h"
18- #include " Wippersnapper.h"
1918
2019/* **********************************************************************************/
2120/* !
@@ -89,7 +88,11 @@ void Wippersnapper_AnalogIO::setADCResolution(int resolution) {
8988 _nativeResolution = 12 ;
9089#elif defined(ARDUINO_ARCH_ESP32)
9190 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
9396#elif defined(ARDUINO_ARCH_RP2040)
9497 scaleAnalogRead = true ;
9598 _nativeResolution = 10 ;
@@ -233,10 +236,8 @@ uint16_t Wippersnapper_AnalogIO::getPinValue(int pin) {
233236/* *********************************************************/
234237float Wippersnapper_AnalogIO::getPinValueVolts (int pin) {
235238#ifdef ARDUINO_ARCH_ESP32
236- WS_DEBUG_PRINTLN (" ESP32: Using analogReadMilliVolts()" );
237239 return analogReadMilliVolts (pin) / 1000.0 ;
238240#else
239- WS_DEBUG_PRINTLN (" Using old getPinValueVolts()" );
240241 uint16_t rawValue = getPinValue (pin);
241242 return rawValue * getAref () / 65536 ;
242243#endif
You can’t perform that action at this time.
0 commit comments