[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] "initializer is not constant"
From: |
Robert Rozman |
Subject: |
Re: [avr-gcc-list] "initializer is not constant" |
Date: |
Fri, 20 Feb 2004 13:36:38 +0100 |
Hi,
thanks for response. Since I'm unexsperienced programmer I still couldn't
find a way how to change my program to work. It worked OK in 2001 version of
avrgcc. I'm initializing struct with
volatile input_sensors sensor_inputs [MAX_SENSOR_GROUPS] = {
LCD_KEYS_PORT, LCD_KEYS_START, LCD_KEYS_NUM, 0x0f, {0xff, 0xff,
0xff, 0xff}, LCD_KEYS_MASKA, INP_KEY, 'K',
....
and LCD_KEYS_PORT is defined with this:
#define LCD_KEYS_PORT PIND
And I get error:
node5_0.c:87: error: initializer element is not constant
node5_0.c:87: error: (near initialization for
`sensor_inputs[0].port_address')
Could anyone tell me what is wrong ? I'm not calline or trasferring any port
adresses. Just plain use of defined PIND constants...
Please have patience with me,
Thanks,
Robert.
----- Original Message -----
From: "Artur Lipowski" <address@hidden>
To: <address@hidden>
Sent: Friday, February 20, 2004 1:07 PM
Subject: Re: [avr-gcc-list] "initializer is not constant"
> Robert Rozman wrote:
> ...
> > And it seems like PIND is not constant anymore ? Do I have to add
something
> > to take into accound _SFR_IO8 macro ?
> ...
>
> To see how to pass (and access) port address look at:
>
http://jubal.westnet.com/AVR/doc/avr-libc-user-manual/FAQ.html#faq_port_pass
>
> Regards,
> --
> Artur Lipowski
>
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list
_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list