X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Ftimer_avr.c;h=5f203ad6341d8b4642175882ea3274315da0991c;hb=5f3952176a4e9a00ca8dd5ec4a6b994958f89e0a;hp=28f89349a02c9f4a01984fdcbb41d15a8d22fb27;hpb=b821a72d490197c1d8b4e4ea51cbfcbe5e9a5fa5;p=bertos.git diff --git a/drv/timer_avr.c b/drv/timer_avr.c old mode 100755 new mode 100644 index 28f89349..5f203ad6 --- a/drv/timer_avr.c +++ b/drv/timer_avr.c @@ -15,6 +15,9 @@ /*#* *#* $Log$ + *#* Revision 1.6 2007/06/07 14:35:12 batt + *#* Merge from project_ks. + *#* *#* Revision 1.5 2007/03/21 11:03:56 batt *#* Add missing support for ATMega1281. *#* @@ -37,10 +40,12 @@ #include #include // BV() +#include + #include #include -#if CPU_AVR_ATMEGA1281 +#if CPU_AVR_ATMEGA1281 || CPU_AVR_ATMEGA168 #define REG_TIFR0 TIFR0 #define REG_TIFR2 TIFR2 @@ -152,7 +157,6 @@ } #elif (CONFIG_TIMER == TIMER_ON_OUTPUT_COMPARE2) - static void timer_hw_init(void) { cpuflags_t flags; @@ -167,8 +171,8 @@ REG_TCCR2A = BV(WGM21); #if TIMER_PRESCALER == 64 - #if CPU_AVR_ATMEGA1281 - // ATMega1281 has undocumented differences in timer2 prescaler! + #if CPU_AVR_ATMEGA1281 || CPU_AVR_ATMEGA168 + // ATMega1281 & ATMega168 have undocumented differences in timer2 prescaler! REG_TCCR2B |= BV(CS22); #else REG_TCCR2B |= BV(CS21) | BV(CS20);