avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] [bugs #11242] iomx8.h ATmega48 eeprom EEAR EEARH


From: Dmitry K.
Subject: Re: [avr-libc-dev] [bugs #11242] iomx8.h ATmega48 eeprom EEAR EEARH
Date: Wed, 8 Dec 2004 09:08:08 +1000
User-agent: KMail/1.5

> Summary:  iomx8.h ATmega48 eeprom EEAR  EEARH
>
> Original Submission:  The header "iomx8.h" don't work for the eeprom of the
> ATmega48 because of:
>
> #if defined (__AVR_ATmega88__) || defined (__AVR_ATmega168__)
> #  define EEAR  _SFR_IO16 (0x21)
> #  define EEARH _SFR_IO8 (0x22)
> #endif
>
> The ATmega48 has only 256 byte eeprom, but despite of this for programming
> or reading, one has to write a zero to EEARH or a uint16_t to EEAR...

I believe, that the `iom48.h' should reflect precisely presence of registers 
at ATmega48.

For a spelling of universal library there is an opportunity:
   #define __COMPILING_AVR_LIBC__
   #include <avr/io.h>

Except for that absence EEARH enables optimization of the program at 
translation under the concrete chip.

Dmitry.





reply via email to

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