19 static constexpr uint8_t CCITT_updateCX(uint8_t crc, uint8_t b) {
20 uint8_t data = crc ^ b;
21 for (uint8_t i = 0; i < 8; i++) {
22 if ((data & 0x80U) != 0) {
37 explicit constexpr
inline U(uint16_t w)
40 return CCITT_updateCX(CCITT_updateCX(crc, u.b[0]), u.b[1]);
Definition: mmu2_crc.h:13
static uint8_t CCITT_update(uint8_t crc, uint8_t b)
Definition: mmu2_crc.cpp:12
static constexpr uint8_t CCITT_updateW(uint8_t crc, uint16_t w)
Compute/update CRC8 CCIIT from 16bits (convenience wrapper)
Definition: mmu2_crc.h:33