diff -Nru avr-libc-1.0/include/avr/timer.h avr-libc-1.0-mega128timer/include/avr/timer.h --- avr-libc-1.0/include/avr/timer.h Tue Jun 10 21:12:25 2003 +++ avr-libc-1.0-mega128timer/include/avr/timer.h Sun Oct 19 14:54:03 2003 @@ -34,6 +34,24 @@ extern "C" { #endif +#if defined(__AVR_ATmega128__) + +/* Atmel changed the Clock Select Bit Description for timer0 on the + mega128. */ + +enum { + STOP = 0, + CK = 1, + CK8 = 2, + CK32 = 3, + CK64 = 4, + CK128 = 5, + CK256 = 6, + CK1024 = 7, +}; + +#else + enum { STOP = 0, CK = 1, @@ -44,6 +62,8 @@ T0_FALLING_EDGE = 6, T0_RISING_EDGE = 7 }; + +#endif static inline void timer0_source (unsigned int src) {