This is actually my bad as I forgot about the offset difference between the IO and MEM SRF macro. Thanks for pointing it out.
On 9/22/10, Anitha Boyapati <invalid.nore...@gnu.org> wrote: > > Follow-up Comment #2, bug #30552 (project avr-libc): > > > For device ATTiny43U: > the patch given for bug30569 defines ADC and ADCW to 0x04 (using _SFR_MEM16 > macro) while datasheet clearly says that address of ADCL is 0x24 and that of > ADCH is 0x25. > > The following diff uses _SFR_IO16 instead of _SFR_MEM16. _SFR_IO16 adds an > offset of 0x20. I think this is appropriate. > > Index: iotn43u.h > =================================================================== > --- iotn43u.h (revision 2184) > +++ iotn43u.h (working copy) > @@ -74,7 +74,10 @@ > #define ADLAR 4 > #define ACME 6 > > +#ifndef _ASSEMBLER_ > #define ADC _SFR_IO16(0x04) > +#endif > +#define ADCW _SFR_IO16(0x04) > > #define ADCL _SFR_IO8(0x04) > > -- Frédéric Nadeau ing. jr _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev