Port Function crc_ccitt_update from C++
Py Thorneiro
pythoneiro at gmail.com
Sat Mar 31 22:40:29 EDT 2007
Hi folks,
Please, I don´t understand exactly what this function CRC CCITT UPDATE
in C++ AVR can be ported 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)) ˆ (uint8_t)(data >> 4)
ˆ ((uint16_t)data << 3));
}
Source:
http://tldp.tuxhilfe.de/linuxfocus/common/src2/article352/avr-libc-user-manual-1.0.4.pdf
In parts reason this lo8 and hi8, is there some good soul here that
can help-me with this conversion?
I try seach in Google and Koders some code that use it, but I don´t had
sucess...
Big Hugs
Thanks
Regards.
-Py -Thorneiro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070331/9de84225/attachment.html>
More information about the Python-list
mailing list