[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] "initializer is not constant"
From: |
Artur Lipowski |
Subject: |
Re: [avr-gcc-list] "initializer is not constant" |
Date: |
Fri, 20 Feb 2004 14:01:33 +0100 |
User-agent: |
Mozilla Thunderbird 0.5+ (Windows/20040219) |
<x-flowed>
Robert Rozman wrote:
...
Could anyone tell me what is wrong ? I'm not calline or trasferring any port
adresses. Just plain use of defined PIND constants...
No, you _are_ transfering port address.
Try this:
typedef struct {
volatile uint8_t *port_address;
....
char znak;
} input_sensors;
#define LCD_KEYS_PORT PIND
volatile input_sensors sensor_inputs[MAX_SENSOR_GROUPS] = {
{ &LCD_KEYS_PORT, LCD_KEYS_START, LCD_KEYS_NUM, 0x0f,
{0xff}, LCD_KEYS_MASKA, INP_KEY, 'K' },
........
}
and use it eg.:
*sensor_inputs[1].port_address |= 0x0f;
Regards,
--
Artur Lipowski
_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list
</x-flowed>