|
@@ -183,8 +183,13 @@ static inline int freeMemory() {
|
183
|
183
|
|
184
|
184
|
#define HAL_ANALOG_SELECT(pin) pinMode(pin, INPUT)
|
185
|
185
|
|
|
186
|
+#ifdef ADC_RESOLUTION
|
|
187
|
+ #define HAL_ADC_RESOLUTION ADC_RESOLUTION
|
|
188
|
+#else
|
|
189
|
+ #define HAL_ADC_RESOLUTION 12
|
|
190
|
+#endif
|
|
191
|
+
|
186
|
192
|
#define HAL_ADC_VREF 3.3
|
187
|
|
-#define HAL_ADC_RESOLUTION ADC_RESOLUTION // 12
|
188
|
193
|
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
189
|
194
|
#define HAL_READ_ADC() HAL_adc_result
|
190
|
195
|
#define HAL_ADC_READY() true
|