On 11/1/05, Omprakash Gnawali <[EMAIL PROTECTED]> wrote: > > When I am trying to use a component that uses > tos/platform/micaz/HPLTimer1M.nc, I get the following error: > > tos/platform/micaz/HPLTimer1M.nc: In function `Timer1.setInterval': > tos/platform/micaz/HPLTimer1M.nc:77: implicit declaration of function `outw' > > It seems there was a discussion about implicit declaration of __outw a > while back, but I didn't see anything about outw not being found. I > downloaded previous versions of avr-libc and it appears that > avr-libc-1.0.5 was the last version before outw was phased out. > > Is there a way to fix this problem short of going back to > avr-libc-1.0.5 ? Can going back to this version cause other problems ?
The following diff should fix this: Index: avrhardware.h =================================================================== RCS file: /cvsroot/tinyos/tinyos-1.x/tos/platform/avrmote/avrhardware.h,v retrieving revision 1.17 diff -u -r1.17 avrhardware.h --- avrhardware.h 23 Jul 2005 21:43:34 -0000 1.17 +++ avrhardware.h 1 Nov 2005 21:57:50 -0000 @@ -66,7 +75,8 @@ #define inb(port) (port) #define outp(value, port) ((port) = (value)) #define outb(port, value) ((port) = (value)) -#define inw(port) (*(volatile uint16_t *)&port) +#define inw(port) (*(volatile uint16_t *)&(port)) +#define outw(port, value) ((*(volatile uint16_t *)&(port)) = (value)) #define PRG_RDB(addr) pgm_read_byte(addr) #endif David Gay _______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
