🐛 Fix missing ADC method

This commit is contained in:
Scott Lahteine
2021-12-25 21:25:47 -06:00
parent d7af619936
commit 57315f02cb
11 changed files with 1 additions and 22 deletions

View File

@@ -142,8 +142,6 @@ typedef libServo hal_servo_t;
// ADC
// ------------------------
#define HAL_ANALOG_SELECT(pin) pinMode(pin, INPUT)
#ifdef ADC_RESOLUTION
#define HAL_ADC_RESOLUTION ADC_RESOLUTION
#else
@@ -240,7 +238,7 @@ public:
}
// Called by Temperature::init for each sensor at startup
static void adc_enable(const pin_t pin);
static inline void adc_enable(const pin_t pin) { pinMode(pin, INPUT); }
// Begin ADC sampling on the given channel
static void adc_start(const pin_t pin) { adc_result = analogRead(pin); }