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

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

[avr-gcc-list] _EEPUT and _EEGET


From: Brian Korsedal
Subject: [avr-gcc-list] _EEPUT and _EEGET
Date: Mon, 15 Sep 2003 08:09:31 -0700

Hi,

If this is a reprint, I'm sorry.  Our email has been really flaky and this
is the third time I've tried to send this out.

I'm trying to save a variable to eeprom so that when I turn the device off,
it remembers the value of the variable.  Every time I start up the device, I
call the line with _EEGET in it.  Whenever the variable changes, I call one
of the lines with _EEPUT in it.  The address is defined on the first page.
Does anyone see anything wrong with how I am implimenting this.  Does anyone
know where I can find a good description of _EEPUT and _EEGET?

loadsave.h:#define EEOS_SERIAL_ADDRESS 0x0401

main.c:  _EEGET (serialAddress, EEOS_SERIAL_ADDRESS);

mmi.c:      if((choice==MI_SERIAL_ADDRESS)&&((serialAddress &
0x0f)<0x0E)){serialAddress++;_EEPUT (EEOS_SERIAL_ADDRESS, &serialAddress);}

mmi.c:      if((choice==MI_SERIAL_ADDRESS)&&((serialAddress &
0x0f)>0x00)){serialAddress--;_EEPUT (EEOS_SERIAL_ADDRESS, &serialAddress);}

mmi.c:      if((choice==MI_SERIAL_ADDRESS)&&((serialAddress &
0x0f)<0x0E)){serialAddress++;_EEPUT (EEOS_SERIAL_ADDRESS, &serialAddress);}

mmi.c:      if((choice==MI_SERIAL_ADDRESS)&&((serialAddress &
0x0f)>0x00)){serialAddress--;_EEPUT (EEOS_SERIAL_ADDRESS, &serialAddress);}


Thanks,

Brian


reply via email to

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