avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] EEPROM again


From: Artur Lipowski
Subject: RE: [avr-gcc-list] EEPROM again
Date: Wed, 13 Aug 2003 12:46:16 +0200

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden Behalf Of Goran Pufler
> Sent: Wednesday, August 13, 2003 11:49 AM
> To: address@hidden
> Subject: [avr-gcc-list] EEPROM again
>
...
> The situation is like this:
> I have structure something like this:
> typedef struct (
>   u16  data1;
>   u16  data2;
>   u08  data3
> ) MY_STRUCT;
>
> and I have array of this structures, so something like
>
> MY_STRUCT dataList[MAX_ELEMENTS]
>
...
> Is there any documentation about using a EEPROM - this
> is my first project in which I must store structure in
> EEPROM, and I'am stuckt :-(
http://savannah.nongnu.org/download/avr-libc/doc/avr-libc-user-manual/group_
_avr__eeprom.html

Suppose you want to write the structure mst to the dataList at index i:
eeprom_write_block (&dataList[i], &mst, sizeof(MY_STRUCT))

This function is in releases after 20030512cvs (eg. in 20030805cvs).

Regards,
--
Artur Lipowski



reply via email to

[Prev in Thread] Current Thread [Next in Thread]