AVR_IO_REGBIT(ADMUX, MUX2), AVR_IO_REGBIT(ADMUX, MUX3),},
.ref = { AVR_IO_REGBIT(ADMUX, REFS0), AVR_IO_REGBIT(ADMUX, REFS1), AVR_IO_REGBIT(ADMUX, REFS2), },
.ref_values = {
- [0] = ADC_VREF_VCC, [1] = ADC_VREF_AVCC,
- [2] = ADC_VREF_V110, [5] = ADC_VREF_V256,
- [6] = ADC_VREF_V256,
+ [0] = ADC_VREF_VCC,
+ [2] = ADC_VREF_V110,
+ [4] = ADC_VREF_VCC,
+ [6] = ADC_VREF_V256, [7] = ADC_VREF_V256,
},
.adlar = AVR_IO_REGBIT(ADMUX, ADLAR),
// if the last bit exists in the mux, we are an extended ADC
avr_regbit_t mux[6];
avr_regbit_t ref[3]; // reference voltages bits
- uint16_t ref_values[7]; // ADC_VREF_*
+ uint16_t ref_values[8]; // ADC_VREF_*
avr_regbit_t adlar; // left/right adjustment bit
{0x9a, 0x80}, // 2.56V ref, ADC0/ADC1 differential, signed +ve overflow
{0x9a, 0x80}, // 2.56V ref, ADC0/ADC1 differential, signed, positive
{0x86, 0x80}, // 1.10V ref, ADC2/ADC3 differential, signed, -ve overflow
- {0x13, 0 }, // 3.00 V external ref, input ADC3
+ {0x43, 0 }, // 3.00 V external ref, input ADC3
};
#define NUM_SUBTESTS (sizeof params / sizeof params[0])