From 1a280c0d5b66fecd0ef719ed7e31ad685522c2f5 Mon Sep 17 00:00:00 2001 From: Niklas Mischkulnig Date: Sat, 27 Aug 2016 11:48:04 +0200 Subject: Add all analog references supported by the ATtinyX5 series --- cores/arduino/Arduino.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'cores/arduino/Arduino.h') diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index f1da68d..e71c9c3 100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -61,10 +61,18 @@ void yield(void); #define FALLING 2 #define RISING 3 -#if defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) || defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) -#define DEFAULT 0 -#define EXTERNAL 1 -#define INTERNAL 2 +#if defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) + #define DEFAULT 0 + #define EXTERNAL 1 + #define INTERNAL1V1 2 + #define INTERNAL INTERNAL1V1 +#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) + #define DEFAULT 0 + #define EXTERNAL 1 + #define INTERNAL1V1 2 + #define INTERNAL INTERNAL1V1 + #define INTERNAL2V56 6 + #define INTERNAL2V56_EXTCAP 7 #else #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega644A__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) #define INTERNAL1V1 2 -- cgit v1.2.3-18-g5258 From bb567ae644b3a2ebbf228e83802a5e7411a1e8eb Mon Sep 17 00:00:00 2001 From: Niklas Mischkulnig Date: Wed, 7 Sep 2016 19:02:48 +0200 Subject: Requested changes to not change code for non ATtinyX5s --- cores/arduino/Arduino.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cores/arduino/Arduino.h') diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index e71c9c3..09c1448 100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -68,11 +68,11 @@ void yield(void); #define INTERNAL INTERNAL1V1 #elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) #define DEFAULT 0 - #define EXTERNAL 1 - #define INTERNAL1V1 2 + #define EXTERNAL 4 + #define INTERNAL1V1 8 #define INTERNAL INTERNAL1V1 - #define INTERNAL2V56 6 - #define INTERNAL2V56_EXTCAP 7 + #define INTERNAL2V56 9 + #define INTERNAL2V56_EXTCAP 13 #else #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega644A__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) #define INTERNAL1V1 2 -- cgit v1.2.3-18-g5258