avr: Add enumerations for the atmega168/328 analog only pins

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2019-03-31 21:27:15 -04:00
parent eedc773d69
commit 2c851e1621
1 changed files with 5 additions and 0 deletions

View File

@ -33,6 +33,11 @@ static const uint8_t adc_pins[] PROGMEM = {
#endif #endif
}; };
// The atmega168/328 have two analog only pins
#if CONFIG_MACH_atmega168 || CONFIG_MACH_atmega328 || CONFIG_MACH_atmega328p
DECL_ENUMERATION_RANGE("pin", "PE0", GPIO('E', 0), 2);
#endif
enum { ADMUX_DEFAULT = 0x40 }; enum { ADMUX_DEFAULT = 0x40 };
enum { ADC_ENABLE = (1<<ADPS0)|(1<<ADPS1)|(1<<ADPS2)|(1<<ADEN)|(1<<ADIF) }; enum { ADC_ENABLE = (1<<ADPS0)|(1<<ADPS1)|(1<<ADPS2)|(1<<ADEN)|(1<<ADIF) };