From f5ffd44e77ca9df9fe0659f4dcda7917ff9ed85a Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sun, 23 Aug 2009 20:59:47 +0000 Subject: [PATCH] Undoing revision 628 because it broke analogRead() on analog inputs 8 to 15 of the Arduino Mega. --- hardware/cores/arduino/wiring_analog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/cores/arduino/wiring_analog.c b/hardware/cores/arduino/wiring_analog.c index 782a0bd0a..529ad529d 100755 --- a/hardware/cores/arduino/wiring_analog.c +++ b/hardware/cores/arduino/wiring_analog.c @@ -42,7 +42,7 @@ int analogRead(uint8_t pin) // set the analog reference (high two bits of ADMUX) and select the // channel (low 4 bits). this also sets ADLAR (left-adjust result) // to 0 (the default). - ADMUX = (analog_reference << 6) | (pin & 0x0f); + ADMUX = (analog_reference << 6) | (pin & 0x07); #if defined(__AVR_ATmega1280__) // the MUX5 bit of ADCSRB selects whether we're reading from channels