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

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

Re: [avr-gcc-list] using EEPROM


From: Jack Valmadre
Subject: Re: [avr-gcc-list] using EEPROM
Date: Thu, 2 Oct 2003 13:13:35 +1000

I've done a bit more searching.  Here's my understanding of how to use it,
please tell me if I'm right or wrong.

#include <avr/io.h>
#include <avr/eeprom.h>

static unsigned char EEaddr __attribute__((section (".eeprom"))) = 0;

...

EEaddr = 0x25;
eeprom_write_byte(&EEaddr, 0x3A);    //write 0x3A to EEPROM address 0x25
EEaddr = 0x9D;
eeprom_write_byte(&EEaddr, 0xA3);    //write 0xA3 to EEPROM address 0x9D

Thanks,
Jack

(sorry Artur about 2 copies, I'll get the hang of replying to the list soon)


----- Original Message ----- 
From: "Artur Lipowski" <address@hidden>
To: <address@hidden>
Sent: Wednesday, October 01, 2003 4:10 PM
Subject: Re: [avr-gcc-list] using EEPROM


> Jack Valmadre wrote:
> ...
> > Can someone explain how to use __attribute__ ((section (".eeprom")))?
> > Does anyone have an example of writing to or reading from the EEPROM?
> RTFM
> It is not polite response, but...
> Did you even try use google with eg. "section eeprom avr gcc" query?
>
> Regards,
> -- 
> Artur Lipowski
>
>
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list



reply via email to

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