From: lottaviano Date: Mon, 2 Aug 2010 19:25:46 +0000 (+0000) Subject: Add timer support for ATMega 1280 (contributed by Fabio Bizzi) X-Git-Tag: 2.6.0~266 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=0f60d6b24cf8ec1c9bd8dca82fed6325932c5aca;p=bertos.git Add timer support for ATMega 1280 (contributed by Fabio Bizzi) git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4124 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/avr/drv/timer_avr.c b/bertos/cpu/avr/drv/timer_avr.c index 70876c01..5decb048 100644 --- a/bertos/cpu/avr/drv/timer_avr.c +++ b/bertos/cpu/avr/drv/timer_avr.c @@ -49,18 +49,18 @@ #include -#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 diff --git a/bertos/cpu/avr/drv/timer_avr.h b/bertos/cpu/avr/drv/timer_avr.h index 78225ff1..e497c919 100644 --- a/bertos/cpu/avr/drv/timer_avr.h +++ b/bertos/cpu/avr/drv/timer_avr.h @@ -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) @@ -111,7 +111,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(TIMER2_COMPA_vect) #else #define DEFINE_TIMER_ISR DECLARE_ISR_CONTEXT_SWITCH(TIMER2_COMP_vect)