aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Sloth Lauszus <lauszus@gmail.com>2013-05-02 01:00:17 +0200
committerKristian Sloth Lauszus <lauszus@gmail.com>2013-05-02 01:00:17 +0200
commit8d7deb7a1fbdbe93547839e355683fe1f2169c25 (patch)
tree4f6187532a3b9464cf812f252d06c4797729c17d
parent0a7b402c4524bf3483ccef3bfa70a6d6de97a912 (diff)
Removed double instance of the same code
-rw-r--r--cores/arduino/wiring_analog.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/cores/arduino/wiring_analog.c b/cores/arduino/wiring_analog.c
index a6b63e3..c99325f 100644
--- a/cores/arduino/wiring_analog.c
+++ b/cores/arduino/wiring_analog.c
@@ -55,10 +55,8 @@ int analogRead(uint8_t pin)
#else
if (pin >= 14) pin -= 14; // allow for channel or pin numbers
#endif
-
-#if defined(__AVR_ATmega32U4__)
- ADCSRB = (ADCSRB & ~(1 << MUX5)) | (((pin >> 3) & 0x01) << MUX5);
-#elif defined(ADCSRB) && defined(MUX5)
+
+#if defined(ADCSRB) && defined(MUX5)
// the MUX5 bit of ADCSRB selects whether we're reading from channels
// 0 to 7 (MUX5 low) or 8 to 15 (MUX5 high).
ADCSRB = (ADCSRB & ~(1 << MUX5)) | (((pin >> 3) & 0x01) << MUX5);