From f9a3b5cfa9b591096b80a7541323c4319da2d32d Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Wed, 8 Sep 2010 22:33:33 +0000 Subject: 1280 -> 1280/2560. --- cores/arduino/wiring_analog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cores/arduino/wiring_analog.c') 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 -- cgit v1.2.3-18-g5258