Add timer support for ATMega 1280 (contributed by Fabio Bizzi)
authorlottaviano <lottaviano@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 2 Aug 2010 19:25:46 +0000 (19:25 +0000)
committerlottaviano <lottaviano@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 2 Aug 2010 19:25:46 +0000 (19:25 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4124 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cpu/avr/drv/timer_avr.c
bertos/cpu/avr/drv/timer_avr.h

index 70876c010b2a664c012618774e408a4120d52286..5decb0483b74afe578a5af86dff782dcf740b1a9 100644 (file)
 
 #include <avr/io.h>
 
-#if CPU_AVR_ATMEGA1281 || CPU_AVR_ATMEGA168 || CPU_AVR_ATMEGA328P
+#if CPU_AVR_ATMEGA1281 || CPU_AVR_ATMEGA1280 || CPU_AVR_ATMEGA168 || CPU_AVR_ATMEGA328P
        #define REG_TIFR0 TIFR0
        #define REG_TIFR1 TIFR1
        #define REG_TIFR2 TIFR2
-       #if CPU_AVR_ATMEGA1281
+       #if CPU_AVR_ATMEGA1281 || CPU_AVR_ATMEGA1280
                #define REG_TIFR3 TIFR3
        #endif
 
        #define REG_TIMSK0 TIMSK0
        #define REG_TIMSK1 TIMSK1
        #define REG_TIMSK2 TIMSK2
-       #if CPU_AVR_ATMEGA1281
+       #if CPU_AVR_ATMEGA1281 || CPU_AVR_ATMEGA1280
                #define REG_TIMSK3 TIMSK3
        #endif
 
index 78225ff19fabe52445f96cb2bb165867f080a0f8..e497c91930830cb90550716b71d1d104b21c296a 100644 (file)
@@ -72,7 +72,7 @@
 
        #define TIMER_PRESCALER      64
        #define TIMER_HW_BITS        8
-       #if CPU_AVR_ATMEGA1281 || CPU_AVR_ATMEGA168 || CPU_AVR_ATMEGA328P
+       #if CPU_AVR_ATMEGA1281 || CPU_AVR_ATMEGA1280 || CPU_AVR_ATMEGA168 || CPU_AVR_ATMEGA328P
                #define DEFINE_TIMER_ISR     DECLARE_ISR_CONTEXT_SWITCH(TIMER0_COMPA_vect)
        #else
                #define DEFINE_TIMER_ISR     DECLARE_ISR_CONTEXT_SWITCH(TIMER0_COMP_vect)
 
        #define TIMER_PRESCALER      64
        #define TIMER_HW_BITS        8
-       #if CPU_AVR_ATMEGA1281 || CPU_AVR_ATMEGA168 || CPU_AVR_ATMEGA328P
+       #if CPU_AVR_ATMEGA1281 || CPU_AVR_ATMEGA1280 || CPU_AVR_ATMEGA168 || CPU_AVR_ATMEGA328P
                #define DEFINE_TIMER_ISR     DECLARE_ISR_CONTEXT_SWITCH(TIMER2_COMPA_vect)
        #else
                #define DEFINE_TIMER_ISR     DECLARE_ISR_CONTEXT_SWITCH(TIMER2_COMP_vect)