summaryrefslogtreecommitdiff
path: root/firmware/2lib/include/2crc8.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/2lib/include/2crc8.h')
-rw-r--r--firmware/2lib/include/2crc8.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/firmware/2lib/include/2crc8.h b/firmware/2lib/include/2crc8.h
index f01eabd9..f9e0ccee 100644
--- a/firmware/2lib/include/2crc8.h
+++ b/firmware/2lib/include/2crc8.h
@@ -5,11 +5,17 @@
* Very simple 8-bit CRC function.
*/
-#ifndef VBOOT_REFERENCE_2_CRC8_H_
-#define VBOOT_REFERENCE_2_CRC8_H_
+#ifndef VBOOT_REFERENCE_2CRC8_H_
+#define VBOOT_REFERENCE_2CRC8_H_
+
+#include "2sysincludes.h"
/**
- * Calculate CRC-8 of the data, using x^8 + x^2 + x + 1 polynomial.
+ * Calculate CRC-8 of the data, using the ITU version.
+ *
+ * Calculate CRC-8 ITU version of the given buffer, using x^8 + x^2 + x + 1
+ * polynomial. Note that the CRC-8 will evaluate to zero for a buffer of all
+ * zeroes.
*
* @param data Data to CRC
* @param size Size of data in bytes
@@ -17,4 +23,4 @@
*/
uint8_t vb2_crc8(const void *data, uint32_t size);
-#endif /* VBOOT_REFERENCE_2_CRC8_H_ */
+#endif /* VBOOT_REFERENCE_2CRC8_H_ */