[Top][All Lists]
[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
- [avr-gcc-list] Mega 128 not optimising correctly ..., Rob Ward, 2002/11/03
- Re: [avr-gcc-list] Mega 128 not optimising correctly ..., E. Weddington, 2002/11/03
- Re: [avr-gcc-list] Mega 128 not optimising correctly ..., Rob Ward, 2002/11/15
- [avr-gcc-list] Anybody perhaps solved these JTAGICE in AVR STUDIO4 problems??, Marc Wetzel, 2002/11/15
- Re: [avr-gcc-list] Mega 128 not optimising correctly ..., E. Weddington, 2002/11/15
- Re: [avr-gcc-list] Mega 128 not optimising correctly ..., Rob Ward, 2002/11/15
- Re: [avr-gcc-list] Mega 128 not optimising correctly ..., E. Weddington, 2002/11/15
- Re: [avr-gcc-list] Mega 128 not optimising correctly ..., Rob Ward, 2002/11/15
- Re: [avr-gcc-list] Mega 128 not optimising correctly ..., E. Weddington, 2002/11/15
- Re: [avr-gcc-list] Mega 128 not optimising correctly ...,
Theodore A. Roth <=
- Re: [avr-gcc-list] Mega 128 not optimising correctly ..., E. Weddington, 2002/11/15