3 uint8_t
twr_crc8(
const uint8_t polynomial,
const void *buffer,
size_t length,
const uint8_t initialization)
5 uint8_t crc = initialization;
6 uint8_t *_buffer = (uint8_t *) buffer;
12 for (
int i = 8; i; --i )
15 ? (crc << 1) ^ polynomial
uint8_t twr_crc8(const uint8_t polynomial, const void *buffer, size_t length, const uint8_t initialization)
Calculate CRC8.