summaryrefslogtreecommitdiff
path: root/include/u-boot
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2018-11-25 19:22:18 +0100
committerTom Rini <trini@konsulko.com>2018-12-08 20:18:32 -0500
commita740ee913ec8ba04cc53100440f94841648324e2 (patch)
tree5e7ce4280365bce24a5747118d1c857a560faeeb /include/u-boot
parentc49aff3e66b930aa06936afee401cf5e19377958 (diff)
lib: merge CRC16-CCITT into u-boot/crc.h
This merges the CRC16-CCITT headers into u-boot/crc.h to prepare for rolling CRC16 into the hash infrastructure. Given that CRC8, CRC32 and CRC32-C already have their prototypes in a single header file, it seems a good idea to also include CRC16-CCITT in the same. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'include/u-boot')
-rw-r--r--include/u-boot/crc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h
index e98cb46c90..111b22c4b6 100644
--- a/include/u-boot/crc.h
+++ b/include/u-boot/crc.h
@@ -11,6 +11,9 @@
/* lib/crc8.c */
unsigned int crc8(unsigned int crc_start, const unsigned char *vptr, int len);
+/* lib/crc16.c - 16 bit CRC with polynomial x^16+x^12+x^5+1 (CRC-CCITT) */
+uint16_t crc16_ccitt(uint16_t crc_start, const unsigned char *s, int len);
+
/* lib/crc32.c */
uint32_t crc32 (uint32_t, const unsigned char *, uint);
uint32_t crc32_wd (uint32_t, const unsigned char *, uint, uint);