[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] AVR GCC compiler for win98
From: |
Rob Ward |
Subject: |
Re: [avr-gcc-list] AVR GCC compiler for win98 |
Date: |
Fri, 19 Apr 2002 08:19:10 +1200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.9) Gecko/20020311 |
Hi. I am using GCC
under w2k. I tried using this code from avrfreaks...
#define
sw4_pin (1<<4) //this could be (1<<PD4)
#define sw4_port PORTD
#define sw4_dir DDRD
#define sw4_in PIND
Then the following to toggle the pin / i/o direction...
sw4_dir &= ~sw4_pin;//set port as input
sw4_port |= sw4_pin; //switch on pull up
however, I get "Invalid lvalue in assignment" for both the last two lines
when compiling. Could anyone tell my why this is?
I don't want to use the __sbi and __cli macros as they take two clock cycles
to execute, whereas and'ing and or'ing the registers directly only takes one
clock cycle (as far as I understand it).
TIA.
Rob Ward
avr-gcc-list at http://avr1.org
- [avr-gcc-list] AVR GCC compiler for win98, sreelakshmi, 2002/04/28
- Re: [avr-gcc-list] AVR GCC compiler for win98, Peter Bosscha, 2002/04/28
- Re: [avr-gcc-list] AVR GCC compiler for win98, Paulo Abreu, 2002/04/28
- Re: [avr-gcc-list] AVR GCC compiler for win98, Nils Kristian Strom, 2002/04/28
- Re: [avr-gcc-list] AVR GCC compiler for win98,
Rob Ward <=
- Re: [avr-gcc-list] AVR GCC compiler for win98, Valéry Florimond \(Thought Technology Ltd\), 2002/04/28
- Re: [avr-gcc-list] AVR GCC compiler for win98, Larry Barello, 2002/04/28
- Re: [avr-gcc-list] AVR GCC compiler for win98, Nils Kristian Strom, 2002/04/28
- Re: [avr-gcc-list] AVR GCC compiler for win98, Rob Ward, 2002/04/28
- Re[2]: [avr-gcc-list] AVR GCC compiler for win98, Andreas Schwarz, 2002/04/28
- Re: [avr-gcc-list] AVR GCC compiler for win98, Rob Ward, 2002/04/28
- RE: [avr-gcc-list] AVR GCC compiler for win98, PE, 2002/04/28
- RE: [avr-gcc-list] AVR GCC compiler for win98, Sander Pool, 2002/04/28
- RE: [avr-gcc-list] AVR GCC compiler for win98, Panther Electronics, 2002/04/28
- RE: [avr-gcc-list] AVR GCC compiler for win98, Marc R. Wetzel, 2002/04/28