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: E. Weddington
Subject: Re: [avr-gcc-list] Mega 128 not optimising correctly ...
Date: Tue, 12 Nov 2002 09:07:35 -0700

On 11 Nov 2002 at 15:32, Theodore A. Roth wrote:

> 
> 
> 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

Thanks, Ted.

Eric

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



reply via email to

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