Skip to content

Commit

Permalink
This should fix #1078 correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
SpenceKonde committed Apr 5, 2024
1 parent 2dad406 commit 9cd78cf
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions megaavr/cores/megatinycore/Arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,21 +210,21 @@
#define _PGA_CFG_MASK 0x03
#define _ADC_LOWLAT_CTRL 0x08
#define _ADC_LOWLAT_VAL 0x04
#define _ADC_ENABLE_VAl 0x10
#define _ADC_ENABLE_VAL 0x10
#define _ADC_ENABLE_CTRL 0x20
#define _ADC_STANDBY_VAl 0X40
#define _ADC_STANDBY_VAL 0X40
#define _ADC_STANDBY_CTRL 0x80
#define PGA_OFF_ONCE 0x01
#define PGA_KEEP_ON 0x02
#define PGA_AUTO_OFF 0x03
#define LOW_LAT_ON 0x0C // deprecated
#define LOW_LAT_OFF 0x08 // deprecated
#define ADC_LOWLAT_ON 0x0C
#define ADC_LOWLAT_OFF 0x08
#define ADC_ENABLE 0x20
#define ADC_DISABLE 0x30
#define ADC_STANDBY_ON 0xC0
#define ADC_STANDBY_OFF 0x80
#define LOW_LAT_ON _ADC_LOWLAT_CTRL | _ADC_LOWLAT_VAL// deprecated
#define LOW_LAT_OFF _ADC_LOWLAT_CTRL// deprecated
#define ADC_LOWLAT_ON _ADC_LOWLAT_CTRL | _ADC_LOWLAT_VAL
#define ADC_LOWLAT_OFF _ADC_LOWLAT_CTRL
#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
#endif

/* Errors in analogReadEnh and analogReadDiff are large negative numbers,
Expand Down

0 comments on commit 9cd78cf

Please sign in to comment.