Skip to content

Commit d2620a7

Browse files
ademuriladyada
authored andcommitted
Fix analog ref enums. (arduino#83)
AR_INTERNAL was removed in arduino#74. Because of this, non-SAMD51 boards fail because AR_INTERNAL isn't defined. This also define AR_INTERNAL_2V23, which is also used for non-SAMD51 boards.
1 parent 2443eac commit d2620a7

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

cores/arduino/wiring_analog.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ void analogReference(eAnalogReference mode)
228228
syncADC();
229229
switch (mode)
230230
{
231-
case AR_INTERNAL:
232231
case AR_INTERNAL2V23:
233232
ADC->INPUTCTRL.bit.GAIN = ADC_INPUTCTRL_GAIN_1X_Val; // Gain Factor Selection
234233
ADC->REFCTRL.bit.REFSEL = ADC_REFCTRL_REFSEL_INTVCC0_Val; // 1/1.48 VDDANA = 1/1.48* 3V3 = 2.2297

cores/arduino/wiring_analog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ typedef enum _eAnalogReference
3737
AR_INTERNAL1V25,
3838
AR_INTERNAL2V0,
3939
AR_INTERNAL2V2,
40+
AR_INTERNAL2V23,
4041
AR_INTERNAL2V4,
4142
AR_INTERNAL2V5,
4243
AR_INTERNAL1V65,

0 commit comments

Comments
 (0)