Skip to main content

Module crc

Module crc 

Source
Expand description

CRC-8 encoder per EN 302 755 Annex F / EN 302 307-1 §5.1.4.

Polynomial: g(X) = (X⁵+X⁴+X³+X²+1)·(X²+X+1)·(X+1) = X⁸+X⁷+X⁶+X⁴+X²+1 = 0xD5

Constants§

CRC8_INIT
Standard CRC-8 initial register value (0x00).
CRC8_POLY
CRC-8 polynomial (0xD5), MSB-first, no reflection.

Functions§

crc8
Compute CRC-8 with the standard initial value (0x00).