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

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

Re: [avr-gcc-list] read write eeprom WINAVR20050214


From: Paul Colin Gloster
Subject: Re: [avr-gcc-list] read write eeprom WINAVR20050214
Date: Tue, 22 Feb 2005 10:49:45 +0100
User-agent: Mutt/1.4.1i

On Fri, Feb 18, 2005 at 09:56:30AM +0530, Royce & Sharal Pereira wrote:
"[..]
[..]I looked in avrlibc docs & I could not find a  
macro for writing a byte to a 16 bit eeprom address.

Though you can write a byte to an 8 bit addr, and a word to a 16 bit addr.

[..]"

If you do not have byte addressable memory but only want to change half a 
word of memory, are your performance constraints really so tight that a 
bitmask is not acceptable? E.g.
word &= 0x00ff;   /*Blank out the most significant byte.*/
word |= byte << 8;   /*Assign the value to the most significant byte.*/
/*Alternatively when the least significant byte is desired...*/
word &= 0xff00;
word |= byte;




reply via email to

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