Skip to content

Commit

Permalink
Update Arduino.h
Browse files Browse the repository at this point in the history
And for 0/1-series
  • Loading branch information
SpenceKonde committed Apr 5, 2024
1 parent 9cd78cf commit 5e3147b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions megaavr/cores/megatinycore/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,21 @@

#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")
#define ADC_LOWLAT_OFF badArg("This option is on 2-series tiny and AVR Ex-series only")
#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)
Expand Down

0 comments on commit 5e3147b

Please sign in to comment.