From 2c851e1621ab6f49f8501ef7805adeb4fc202e98 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 31 Mar 2019 21:27:15 -0400 Subject: [PATCH] avr: Add enumerations for the atmega168/328 analog only pins Signed-off-by: Kevin O'Connor --- src/avr/adc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/avr/adc.c b/src/avr/adc.c index 8b478d08..111c006d 100644 --- a/src/avr/adc.c +++ b/src/avr/adc.c @@ -33,6 +33,11 @@ static const uint8_t adc_pins[] PROGMEM = { #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 { ADC_ENABLE = (1<