Add support for the ATmega1284/1284P.

As we don't need exclusive features of these chips, simply re-use
the definitions for the ATmega644.
This commit is contained in:
Markus Hitter 2012-05-11 02:02:52 +02:00
parent 15476fa655
commit 18f63ccf8e
2 changed files with 10 additions and 9 deletions

View File

@ -67,20 +67,19 @@
added as necessary or if I feel like it- not a comprehensive list! added as necessary or if I feel like it- not a comprehensive list!
*/ */
#if defined (__AVR_ATmega168__) || defined (__AVR_ATmega328__) || defined (__AVR_ATmega328P__) #if defined (__AVR_ATmega168__) || defined (__AVR_ATmega328__) || \
defined (__AVR_ATmega328P__)
#include "arduino_168_328p.h" #include "arduino_168_328p.h"
#endif /* _AVR_ATmega{168,328,328P}__ */ #endif
#if defined (__AVR_ATmega644__) || defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644PA__) #if defined (__AVR_ATmega644__) || defined (__AVR_ATmega644P__) || \
defined (__AVR_ATmega644PA__) || defined (__AVR_ATmega1284__) || \
defined (__AVR_ATmega1284P__)
#include "arduino_644.h" #include "arduino_644.h"
#endif /* _AVR_ATmega{644,644P,644PA}__ */ #endif
#if defined (__AVR_ATmega1280__) #if defined (__AVR_ATmega1280__) || defined (__AVR_ATmega2560__)
#include "arduino_1280.h" #include "arduino_1280.h"
#endif /* __AVR_ATmega1280__ */
#if defined (__AVR_ATmega2560__)
#include "arduino_1280.h" //2560 has the same pins and ports so we can reuse the 1280 file.
#endif #endif
#if defined (__AVR_AT90USB1287__) #if defined (__AVR_AT90USB1287__)

View File

@ -118,10 +118,12 @@ void heater_init() {
case (uint16_t) &OCR3BL: case (uint16_t) &OCR3BL:
TCCR3A |= MASK(COM3B1); TCCR3A |= MASK(COM3B1);
break; break;
#ifdef COM3C1
case (uint16_t) &OCR3CL: case (uint16_t) &OCR3CL:
TCCR3A |= MASK(COM3C1); TCCR3A |= MASK(COM3C1);
break; break;
#endif #endif
#endif
#ifdef TCCR4A #ifdef TCCR4A
case (uint16_t) &OCR4AL: case (uint16_t) &OCR4AL:
TCCR4A |= MASK(COM4A1); TCCR4A |= MASK(COM4A1);