Removed call to analogPinToChannel for Leonardo
This commit is contained in:
parent
b9717187fd
commit
8d26462be2
|
@ -54,7 +54,6 @@ int analogRead(uint8_t pin)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__AVR_ATmega32U4__)
|
#if defined(__AVR_ATmega32U4__)
|
||||||
pin = analogPinToChannel(pin);
|
|
||||||
ADCSRB = (ADCSRB & ~(1 << MUX5)) | (((pin >> 3) & 0x01) << MUX5);
|
ADCSRB = (ADCSRB & ~(1 << MUX5)) | (((pin >> 3) & 0x01) << MUX5);
|
||||||
#elif defined(ADCSRB) && defined(MUX5)
|
#elif defined(ADCSRB) && defined(MUX5)
|
||||||
// the MUX5 bit of ADCSRB selects whether we're reading from channels
|
// the MUX5 bit of ADCSRB selects whether we're reading from channels
|
||||||
|
|
Loading…
Reference in New Issue