CRC-CCITT 16-bit Python Manual Calculation

前端 未结 7 1181
情深已故
情深已故 2021-02-06 10:48

Problem

I am writing code for an embedded device. A lot of solutions out there for CRC-CCITT 16-bit calculations require libraries.

Given that u

7条回答
  •  盖世英雄少女心
    2021-02-06 11:27

    The original function, checkCRC, can also do "CRC-CCITT (XModem)".

    Just set:

    poly = 0x1021
    reg = 0
    

    Instead of

    poly = 0x11021
    reg = 0xFFFF
    

提交回复
热议问题