Removed double instance of the same code
This commit is contained in:
parent
0a7b402c45
commit
8d7deb7a1f
|
@ -55,10 +55,8 @@ int analogRead(uint8_t pin)
|
||||||
#else
|
#else
|
||||||
if (pin >= 14) pin -= 14; // allow for channel or pin numbers
|
if (pin >= 14) pin -= 14; // allow for channel or pin numbers
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__AVR_ATmega32U4__)
|
#if defined(ADCSRB) && defined(MUX5)
|
||||||
ADCSRB = (ADCSRB & ~(1 << MUX5)) | (((pin >> 3) & 0x01) << 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
|
||||||
// 0 to 7 (MUX5 low) or 8 to 15 (MUX5 high).
|
// 0 to 7 (MUX5 low) or 8 to 15 (MUX5 high).
|
||||||
ADCSRB = (ADCSRB & ~(1 << MUX5)) | (((pin >> 3) & 0x01) << MUX5);
|
ADCSRB = (ADCSRB & ~(1 << MUX5)) | (((pin >> 3) & 0x01) << MUX5);
|
||||||
|
|
Loading…
Reference in New Issue