Hi Michael, Thanks for your reply. I have solved the problem by adding ULL to the value I assigned to the variable n. It is as follows:
uint64_t n=0x01FFFFFFFFFFFFFF; howver, I have encountered some other problems. The program working on telosb can't work on micaZ at all. i am still investigating what the problem is. But it is really strange when I tried to use micaZ instead of telosb. I didn't expect such more problems than I thought. Regards, Bai On Wed, Sep 9, 2009 at 2:15 AM, Michael Schippling <[email protected]>wrote: > I think the MSP chip in the telos is 16 bit whereas the ATMEGA in > the micas is 8. Probably the ATMEGA doesn't support 64 bit quantities. > Look in the avr system header files to see if there is any indication. > > MS > > > BAI LI wrote: > >> Hi, >> I have developed a hash function recently on telosb. Now I tested it on >> micaz. When I compiled the program on telosb, there is no warning or errors. >> However, when it comes to micaZ nodes, it gave me a warining: >> squashm.nc:70 <http://squashm.nc:70>: warning: integer constant is too >> large for 'long' type >> The 70th line of code is like the following: >> uint64_t n=0x01FFFFFFFFFFFFFF; >> I wonder how come telosb can hold this big integer not Micaz? >> Should I ingnore this warning or fix it? How to fix this warning? Thanks. >> Regards, >> Bai >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Tinyos-help mailing list >> [email protected] >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> >
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
