Initial support for ATmega328P (Arduino Duemilanove).
[bertos.git] / bertos / cpu / detect.h
index 6c0d8f6e35f4fd606e9a148b952997c19e756f8d..c6de054b189732fcbec2a8d0507232dffde62bf1 100644 (file)
                #define CPU_AVR_ATMEGA168   0
        #endif
 
+       #if defined(__AVR_ATmega328P__)
+               #define CPU_AVR_ATMEGA328P   1
+       #else
+               #define CPU_AVR_ATMEGA328P   0
+       #endif
+
        #if defined(__AVR_ATmega1281__)
                #define CPU_AVR_ATMEGA1281  1
        #else
        #endif
 
        #if CPU_AVR_ATMEGA32 + CPU_AVR_ATMEGA64 + CPU_AVR_ATMEGA103 + CPU_AVR_ATMEGA128 \
-         + CPU_AVR_ATMEGA8 + CPU_AVR_ATMEGA168 + CPU_AVR_ATMEGA1281 != 1
+         + CPU_AVR_ATMEGA8 + CPU_AVR_ATMEGA168 + CPU_AVR_ATMEGA328P + CPU_AVR_ATMEGA1281 != 1
                #error AVR CPU configuration error
        #endif
 #else
        #define CPU_AVR                 0
        #define CPU_AVR_ATMEGA8         0
        #define CPU_AVR_ATMEGA168       0
+       #define CPU_AVR_ATMEGA328P       0
        #define CPU_AVR_ATMEGA32        0
        #define CPU_AVR_ATMEGA64        0
        #define CPU_AVR_ATMEGA103       0