From fa7c8b299ca5f8be9c45ea8b8c80f216c6ed148e Mon Sep 17 00:00:00 2001 From: rubenstar Date: Fri, 14 Jun 2024 19:14:00 +0200 Subject: [PATCH] Remove eAnalogReference from ArduinoCore-samd Moved to ArduinoCore-API and renamed to AnalogReference --- cores/arduino/Arduino.h | 12 ------------ cores/arduino/wiring_analog.c | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index d78acd9b4..ed8d27a38 100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -73,18 +73,6 @@ extern "C"{ #ifdef __cplusplus extern "C" { #endif -/* - * \brief SAMD products have only one reference for ADC - */ -typedef enum _eAnalogReference -{ - AR_DEFAULT, - AR_INTERNAL, - AR_EXTERNAL, - AR_INTERNAL1V0, - AR_INTERNAL1V65, - AR_INTERNAL2V23 -} eAnalogReference ; /* * \brief Set the resolution of analogRead return values. Default is 10 bits (range from 0 to 1023). diff --git a/cores/arduino/wiring_analog.c b/cores/arduino/wiring_analog.c index 2476e0105..5d3e63b7f 100644 --- a/cores/arduino/wiring_analog.c +++ b/cores/arduino/wiring_analog.c @@ -91,7 +91,7 @@ static inline uint32_t mapResolution(uint32_t value, uint32_t from, uint32_t to) * * Warning : On Arduino Zero board the input/output voltage for SAMD21G18 is 3.3 volts maximum */ -void analogReference(eAnalogReference mode) +void analogReference(AnalogReference mode) { syncADC(); switch (mode)