chg: crc16 got a compute_crc function

This commit is contained in:
iceman1001 2018-01-30 03:31:11 +01:00
commit bf25b1c9ba
6 changed files with 41 additions and 10 deletions

View file

@ -32,6 +32,9 @@ uint16_t update_crc16_ex( uint16_t crc, uint8_t c, uint16_t polynomial );
uint16_t update_crc16(uint16_t crc, uint8_t c);
uint16_t crc16(uint8_t const *message, size_t length, uint16_t remainder, uint16_t polynomial, bool refin, bool refout);
//
void compute_crc(CrcType_t ct, const uint8_t *d, size_t n, uint8_t *first, uint8_t *second);
// Calculate CRC-16/CCITT-FALSE checksum
uint16_t crc16_ccitt(uint8_t const *d, size_t n);