File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -41,13 +41,15 @@ extern "C"{
4141*/
4242
4343 // internal from VREF
44- // external from VREF pin
4544
46- #define INTERNAL0V55 0x0
47- #define INTERNAL1V1 0x1
48- #define INTERNAL2V5 0x2
49- #define INTERNAL4V3 0x3
50- #define INTERNAL1V5 0x4
45+ /* Values shifted to avoid clashing with ADC REFSEL defines
46+ Will shift back in analog_reference function
47+ */
48+ #define INTERNAL0V55 (VREF_ADC0REFSEL_0V55_gc >> VREF_ADC0REFSEL_gp)
49+ #define INTERNAL1V1 (VREF_ADC0REFSEL_1V1_gc >> VREF_ADC0REFSEL_gp)
50+ #define INTERNAL2V5 (VREF_ADC0REFSEL_2V5_gc >> VREF_ADC0REFSEL_gp)
51+ #define INTERNAL4V3 (VREF_ADC0REFSEL_4V34_gc >> VREF_ADC0REFSEL_gp)
52+ #define INTERNAL1V5 (VREF_ADC0REFSEL_1V5_gc >> VREF_ADC0REFSEL_gp)
5153
5254#define DEFAULT INTERNAL0V55
5355#define INTERNAL ADC_REFSEL_INTREF_gc
You can’t perform that action at this time.
0 commit comments