From 85f10a7150726e58a4e24358edf978241a777048 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Mon, 24 Oct 2011 15:44:01 -0400 Subject: Correcting analogReference() constants for ATtiny24/44/84 and 25/45/85. DEFAULT, EXTERNAL, and INTERNAL have different values on those processors. --- cores/arduino/Arduino.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cores/arduino/Arduino.h') diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 7f2fc05..07216f9 100755 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -40,6 +40,11 @@ extern "C"{ #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 +#else #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) #define INTERNAL1V1 2 #define INTERNAL2V56 3 @@ -48,6 +53,7 @@ extern "C"{ #endif #define DEFAULT 1 #define EXTERNAL 0 +#endif // undefine stdlib's abs if encountered #ifdef abs -- cgit v1.2.3-18-g5258 From 8d48010edfd3a031045bc510c7bcd651cf30c6f8 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Mon, 24 Oct 2011 16:50:15 -0400 Subject: Moving ARDUINO_MAIN from main.cpp to wiring_digital.c and hiding PA, PB, etc. http://code.google.com/p/arduino/issues/detail?id=677 http://code.google.com/p/arduino/issues/detail?id=691 --- cores/arduino/Arduino.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cores/arduino/Arduino.h') diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 07216f9..ebd374a 100755 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -148,6 +148,7 @@ extern const uint8_t PROGMEM digital_pin_to_timer_PGM[]; #define NOT_A_PIN 0 #define NOT_A_PORT 0 +#ifdef ARDUINO_MAIN #define PA 1 #define PB 2 #define PC 3 @@ -159,6 +160,7 @@ extern const uint8_t PROGMEM digital_pin_to_timer_PGM[]; #define PJ 10 #define PK 11 #define PL 12 +#endif #define NOT_ON_TIMER 0 #define TIMER0A 1 -- cgit v1.2.3-18-g5258