functions for calculating checksums.
This value is often used in checksum calculations.
CRC8, XOR, LRC(ASCII format) calculations.
CRC8_u8CalcU16(), CRC8_u8CalcU32()
computes CRC8 using u16c, u32c
as big-endian sequence.
There are different types of CRC8 depending on the calculation formula, initial value, etc. This library uses a polynomial formula of X^8+X^5+X^4+1
(Polynomial Value is 0x31). This is sometimes called CRC8-CCITT or CRC8-Maxim.
XOR is the exclusive OR XOR of each element.
LRC calculates the sum of the values of each element and takes the two's complement of the lower 8 bits. The result is zero when all elements, including the checksum, are added together.
Added as a library procedure because it is used to check data strings in wireless packets, checksums (LRC) in ASCII format, and various sensors.