mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Undoing revision 628 because it broke analogRead() on analog inputs 8 to 15 of the Arduino Mega.
This commit is contained in:
parent
e0d0e22eda
commit
f5ffd44e77
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user