[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] structures in eeprom
From: |
David Smead |
Subject: |
Re: [avr-gcc-list] structures in eeprom |
Date: |
Thu, 24 Jan 2002 09:07:20 -0800 (PST) |
Glen,
You need to typedef the struct, not declare an instance of it.
--
Sincerely,
David Smead
http://www.amplepower.com.
On Thu, 24 Jan 2002, Glen Bankston wrote:
> Hello,
>
> I need a little help in defining and using structures in eeprom.
>
> Here's an example:
>
> struct abc
> {
> double x;
> double y;
> u08 i;
> };
>
> static abc record1 __attribute__((section (".eeprom"))) = 0,0,0;
> static abc record2 __attribute__((section (".eeprom"))) = 0,0,0;
> static u08 limit1_chan __attribute__((section (".eeprom"))) = 3;
> static u08 limit2_chan __attribute__((section (".eeprom"))) = 3;
>
> What is wrong with this? I want to be able to read any data in structure
> record1 at will. I would have thought &record1.x would yield the eeprom
> address of that data!?
>
> Thanks,
>
> Glen WB4ZNW
> Microsystems Engineering
>
> avr-gcc-list at http://avr1.org
>
avr-gcc-list at http://avr1.org