http://delphi.ktop.com.tw/board.php?cid=168&fid=917&tid=19517
CRC-16範例
// Update the CRC for transmitted and received data using
// the CCITT 16bit algorithm (X^16 + X^12 + X^5 + 1).
unsigned char ser_data;
static unsigned int crc;
crc = (unsigned char)(crc >> 8) | (crc <<>> 4;
crc ^= (crc << color="red">Note: It is best not to alter this code. For example, (crc<<8)<<4>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment