diff --git a/megaavr/cores/megatinycore/Arduino.h b/megaavr/cores/megatinycore/Arduino.h index b2b6492e..3421c0c2 100644 --- a/megaavr/cores/megatinycore/Arduino.h +++ b/megaavr/cores/megatinycore/Arduino.h @@ -96,6 +96,10 @@ #if MEGATINYCORE_SERIES < 2 /* ADC constants for 0/1-series */ + #define _ADC_ENABLE_VAL 0x10 + #define _ADC_ENABLE_CTRL 0x20 + #define _ADC_STANDBY_VAL 0X40 + #define _ADC_STANDBY_CTRL 0x80 #define LOW_LAT_ON badArg("This option is on 2-series tiny and AVR Ex-series only") #define LOW_LAT_OFF badArg("This option is on 2-series tiny and AVR Ex-series only") #define ADC_LOWLAT_ON badArg("This option is on 2-series tiny and AVR Ex-series only") @@ -103,10 +107,10 @@ #define PGA_KEEP_ON badArg("This option is on 2-series tiny and AVR Ex-series only") #define PGA_AUTO_OFF badArg("This option is on 2-series tiny and AVR Ex-series only") #define PGA_OFF_ONCE badArg("This option is on 2-series tiny and AVR Ex-series only") - #define ADC_ENABLE 0x20 - #define ADC_DISABLE 0x30 - #define ADC_STANDBY_ON 0xC0 - #define ADC_STANDBY_OFF 0x80 + #define ADC_ENABLE _ADC_ENABLE_CTRL | _ADC_ENABLE_VAL + #define ADC_DISABLE _ADC_ENABLE_CTRL + #define ADC_STANDBY_ON _ADC_STANDBY_CTRL | _ADC_STANDBY_VAL + #define ADC_STANDBY_OFF _ADC_STANDBY_CTRL #define INTERNAL0V55 (VREF_ADC0REFSEL_0V55_gc >> VREF_ADC0REFSEL_gp) #define INTERNAL1V1 (VREF_ADC0REFSEL_1V1_gc >> VREF_ADC0REFSEL_gp) #define INTERNAL2V5 (VREF_ADC0REFSEL_2V5_gc >> VREF_ADC0REFSEL_gp)