(I take it this is tos/system/crc.h.)

 

Yep – that looks like a bug. Fortunately it got fixed since 1.0. If you upgrade to 1.1.0 you won’t see that problem. See the Downloads page.

 

-kw

 

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of vitaly bokser
Sent: Tuesday, December 09, 2003 5:31 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [Tinyos-help] crc.h possible problem...??? am i incorrect in this...

 

but it look slike there is a bug in the crc code...

since the variable crc is being over shadowed by the local variable...???

 

in file crc.h

tinyos 1.0

 

uint16_t crcByte(uint16_t crc, uint8_t byte)
{
  uint16_t crc;
  uint8_t i;
 
  crc = crc ^ byte << 8;
  i = 8;
  do
    if (crc & 0x8000)
      crc = crc << 1 ^ 0x1021;
    else
      crc = crc << 1;
  while (--i);

 

  return crc;
}

_______________________________________________
Tinyos-users mailing list
[EMAIL PROTECTED]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users

Reply via email to