[gnoduino: 181/237] Correcting analogReference() constants for ATtiny24/44/84 and 25/45/85.
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnoduino: 181/237] Correcting analogReference() constants for ATtiny24/44/84 and 25/45/85.
- Date: Sat, 31 Mar 2012 20:30:02 +0000 (UTC)
commit 892cc510d715a9caf196647c25593c67a7ffab64
Author: David A. Mellis <d mellis arduino cc>
Date: Mon Oct 24 15:44:01 2011 -0400
Correcting analogReference() constants for ATtiny24/44/84 and 25/45/85.
DEFAULT, EXTERNAL, and INTERNAL have different values on those processors.
arduino/cores/arduino/Arduino.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/arduino/cores/arduino/Arduino.h b/arduino/cores/arduino/Arduino.h
index 7f2fc05..07216f9 100755
--- a/arduino/cores/arduino/Arduino.h
+++ b/arduino/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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]