> -----Original Message----- > From: > avr-libc-dev-bounces+eric.weddington=atmel....@nongnu.org > [mailto:avr-libc-dev-bounces+eric.weddington=atmel....@nongnu. > org] On Behalf Of Galen Seitz > Sent: Saturday, March 13, 2010 11:56 AM > To: avr-libc-dev@nongnu.org > Subject: Re: [avr-libc-dev] fuse API on the xmega16a4
> > My guess is that the API is intentionally different. > However, it's a bug in that avr-libc is not correctly > accounting for the differences. That's something we need to fix. > > Would something like this be appropriate? > > --- /usr/avr/include/avr/fuse.h 2010-03-10 16:32:49.000000000 -0800 > +++ fuse.h 2010-03-13 10:54:26.000000000 -0800 > @@ -261,8 +261,12 @@ > #endif > > #ifndef FUSES > +#ifdef __AVR_XMEGA__ > +#define FUSES NVM_FUSES_t __fuse FUSEMEM > +#else > #define FUSES __fuse_t __fuse FUSEMEM > #endif > +#endif > > #endif /* !__ASSEMBLER__ */ > Yes, absolutely! That's exactly what I was thinking of. I have an additional problem though, that I noticed last night: I'm in the middle of adding support for a new xmega device, the ATxmega128A1U, which is a variant on the regular xmega128A1, and I have the header file generated and committed. I noticed that this header file does not contain an NVM_FUSES_t structure. It's the only xmega header file that doesn't have this structure. So I think that there might be something wrong with the XML device file (which is the source for the generated header file), that it might have this structure missing. I have to go track that down on my side... Please let me know if you have any further suggestions or patches. Thanks, Eric Weddington _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev