Re: CRC CCITT UPDATE in Python

2007-04-04 Thread Gabriel Genellina
En Sun, 01 Apr 2007 10:10:04 -0300, [Py Thorneiro] <[EMAIL PROTECTED]> escribió: [Py Thorneiro] >> > uint16_t >> > crc_ccitt_update (uint16_t crc, uint8_t data) >> > { >> >data ˆ= lo8 (crc); >> >data ˆ= data << 4; >> >return uint16_t)data << 8) | hi8 (crc)) ˆ (uint8_t)(data >> 4)

Re: CRC CCITT UPDATE in Python

2007-04-01 Thread Py Thorneiro
Hi Martin! OK, thanks; but its work in AVR... After compile it and work in agree with the device that I need to talk, the software work fine, but I would like port it to PC in Python... Hi Folks, So sorry, but I try find it googling, searkoding ( http://www.koders.com) and try underst

Re: CRC CCITT UPDATE in Python

2007-03-31 Thread Martin v. Löwis
> Please, is there here some good soul that understand this > functions hi8 and lo8 (from GCC AVR) and can help me to port it to > Python? > > uint16_t > crc_ccitt_update (uint16_t crc, uint8_t data) > { >data ˆ= lo8 (crc); >data ˆ= data << 4; >return uint16_t)data << 8) | h

CRC CCITT UPDATE in Python

2007-03-31 Thread pythoneiro
Please, Please, is there here some good soul that understand this functions hi8 and lo8 (from GCC AVR) and can help me to port it to Python? uint16_t crc_ccitt_update (uint16_t crc, uint8_t data) { data ˆ= lo8 (crc); data ˆ= data << 4; return uint16_t)data << 8) | hi8 (crc)) ˆ