AW: [En-Nut-Discussion] Just a minor patch...

Radek Podgorny radek at podgorny.cz
Tue Sep 21 16:13:39 CEST 2004


Hi,

it's the line just after the #ifdef. Somehow, it doesn't compile when we use 
the two-digit notation:

bad: outp(BV(CS00) | BV(CS02) | BV(WGM01), TCCR0);
good: outp(BV(CS0) | BV(CS2) | BV(WGM1), TCCR0);

I have practicaly no experience with avr and related stuff, this is just what 
i found by experimenting...

Radek Podgorny


> Radek,
>
> your patch was
>
> --- timer.c.orig        2004-03-05 21:38:41.000000000 +0100
> +++ timer.c     2004-08-04 15:32:42.000000000 +0200
> @@ -634,7 +634,7 @@
>        *   register, so we'll get a compare match interrupt every
> millisecond. */
>   #ifdef __AVR_ATmega128__
> -    outp(BV(CS00) | BV(CS20) | BV(WGM01), TCCR0);
> +    outp(BV(CS0) | BV(CS2) | BV(WGM1), TCCR0);
>   #else
>       outp(BV(CS00) | BV(CS02) | BV(CTC0), TCCR0);
>   #endif
>
> os/arch/avr_timer.c in HEAD (and 3.9.1) is
>
> #ifdef __AVR_ATmega128__
>      outp(BV(CS00) | BV(CS02) | BV(WGM01), TCCR0);
> #else
>      outp(BV(CS00) | BV(CS02) | BV(CTC0), TCCR0);
> #endif
>
> Where is the difference between your patch and the current
> release?
>
> Harald
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion

-- 
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x98E56D84



More information about the En-Nut-Discussion mailing list