avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Mega 128 not optimising correctly ...


From: Theodore A. Roth
Subject: Re: [avr-gcc-list] Mega 128 not optimising correctly ...
Date: Mon, 11 Nov 2002 15:32:51 -0800 (PST)

On Mon, 11 Nov 2002, E. Weddington wrote:

:) #define SetClockHigh() ((unsigned char)PORTD |= (unsigned char)0x80)
:) // set clock line high
:)
:) #define SetClockLow() ((unsigned char)PORTD &= (unsigned char)~0x80)
:) // set clock line low
:) // Note the placement of typecast before the bit-wise NOT.
:)
:) Note, that I haven't tried this, as I don't get the same problem.

I'd suggest avoiding those casts on PORTD since it's already hiding some
casts in the macros defined in sfr_defs.h.

I got bit by that already in the malloc code. (I spent a week tracking
that one down).

Ted Roth

avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]