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: Julius Luukko
Subject: Re: [avr-gcc-list] read write eeprom WINAVR20050214
Date: Fri, 18 Feb 2005 08:16:08 +0200
User-agent: KMail/1.6.2

On Friday 18 February 2005 06:26, Royce & Sharal Pereira wrote:
> Hi,
> ----------------------------------------
> On Fri, 18 Feb 2005 10:57:53 +0700, andi
>
> <address@hidden> wrote:
> > Hi,
> > I only got command read and write 1 byte eeprom for 255 byte eeprom size
> > in eeprom.h.
> >
> > extern uint8_t eeprom_read_byte (const uint8_t *addr);
> >
> > extern void eeprom_write_byte (uint8_t *addr, uint8_t val);
> >
> > it's only for eeprom in address lower than 256 byte
>
> ------------------------------------------
> Actually that's right...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.
>
> Or does this feature exist somewhere?
>
> Thanks,
> --Royce.

Hello Royce,

The address is an address to an 8 bit variable (which is 16 bits on AVR), not 
a 8 bit address. Basic C pointer stuff.

-- 
Julius Luukko




reply via email to

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