mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
libs/libc/misc/lib_crc8ccitt.c: Adds implementation of CRC8-CCITT.
This commit is contained in:
committed by
Gregory Nutt
parent
bbd8cfbfb5
commit
ea1689409f
+13
-1
@@ -59,7 +59,8 @@ extern "C"
|
||||
* Name: crc8part
|
||||
*
|
||||
* Description:
|
||||
* Continue CRC calculation on a part of the buffer.
|
||||
* Continue CRC calculation on a part of the buffer using the polynomial
|
||||
* x^8+x^6+x^3+x^2+1 (Koopman, et al. "0xA6" poly).
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@@ -76,6 +77,17 @@ uint8_t crc8part(FAR const uint8_t *src, size_t len, uint8_t crc8val);
|
||||
|
||||
uint8_t crc8(FAR const uint8_t *src, size_t len);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: crc8ccitt
|
||||
*
|
||||
* Description:
|
||||
* Return an 8-bit CRC of the contents of the 'src' buffer, length 'len'
|
||||
* using the polynomial x^8+x^2+x^1+1 (aka "0x07" poly).
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
uint8_t crc8ccitt(FAR const uint8_t *src, size_t len);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user