diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2010-09-08 22:33:33 +0000 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2010-09-08 22:33:33 +0000 |
commit | f9a3b5cfa9b591096b80a7541323c4319da2d32d (patch) | |
tree | e371a9e83e28c3eeb7113b963c44cd11fe0135ee /cores/arduino/wiring_analog.c | |
parent | 4bbd4f7448907ed0133ef737fc694751f9f97ea3 (diff) |
1280 -> 1280/2560.
Diffstat (limited to 'cores/arduino/wiring_analog.c')
-rwxr-xr-x | cores/arduino/wiring_analog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cores/arduino/wiring_analog.c b/cores/arduino/wiring_analog.c index 63be477..da0cf07 100755 --- a/cores/arduino/wiring_analog.c +++ b/cores/arduino/wiring_analog.c @@ -39,7 +39,7 @@ int analogRead(uint8_t pin) { uint8_t low, high; -#if defined(__AVR_ATmega1280__) +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) if (pin >= 54) pin -= 54; // allow for channel or pin numbers // the MUX5 bit of ADCSRB selects whether we're reading from channels @@ -133,7 +133,7 @@ void analogWrite(uint8_t pin, int val) // set pwm duty OCR2B = val; #endif -#if defined(__AVR_ATmega1280__) +#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) // XXX: need to handle other timers here } else if (digitalPinToTimer(pin) == TIMER3A) { // connect pwm to pin on timer 3, channel A |