48 const uint8_t *buf8 = (
const uint8_t *) buf;
49 for (i=0; i<buf_length; i++)
51 crc = (crc << 8) ^ CRC_LOOK_UP[ (crc >> 8) ^ buf8[i] ];
75 return (crc == block2->
crc) ?
true:
false;
Declares the functions to compute and validate the CRC of a buffer.
uint16_t compute16CCITT(const void *buf, size_t buf_length)
This function computes the CRC-8-CCITT (Cyclic Redundancy Check) of a buffer "buf" of "buf_length" by...
bool isValid(const void *block)
Validates whether the calculated CRC of the SBF block at hand matches the CRC field of the streamed S...