pub fn crc(bytes: &[u8]) -> u8Expand description
Computes the CRC-8 the part appends to every data word.
Polynomial 0x31 (x^8 + x^5 + x^4 + 1), initial value 0xFF, no input or output
reflection, and no final XOR; the datasheet’s check value is CRC(0xBEEF) = 0x92.
The part covers exactly the two data bytes that precede each CRC byte.
§Arguments
bytes- the bytes the CRC covers, in transmission order.
§Returns
The 8-bit CRC.