pw_checksum: CRC classes; Update CRC-16-CCITT name
- Rename CcittCrc16 and related functions to Crc16Ccitt, which matches
the algorithm's full standard name (CRC-16-CCITT).
- Create classes for calculating the CRC-16-CCITT and CRC-32. Use the
function names, which were nouns, as the class names (Crc16Ccitt and
Crc32) and provide the functions as class static functions
(Crc16Ccitt::Calculate and Crc32::Calculate).
Change-Id: I625ed715935de3f1000d3119c21a2f6d01245173
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/17403
Reviewed-by: Keir Mierle <keir@google.com>
diff --git a/pw_checksum/crc32_test_c.c b/pw_checksum/crc32_test_c.c
index 107f077..e607fb3 100644
--- a/pw_checksum/crc32_test_c.c
+++ b/pw_checksum/crc32_test_c.c
@@ -15,9 +15,11 @@
#include "pw_checksum/crc32.h"
uint32_t CallChecksumCrc32(const void* data, size_t size_bytes) {
- return pw_ChecksumCrc32(data, size_bytes);
+ return pw_checksum_Crc32(data, size_bytes);
}
-uint32_t CallChecksumCrc32Append(const void* data, size_t size_bytes) {
- return pw_ChecksumCrc32Append(data, size_bytes, ~0xFFFFFFFFu);
-}
\ No newline at end of file
+uint32_t CallChecksumCrc32Append(const void* data,
+ size_t size_bytes,
+ uint32_t value) {
+ return pw_checksum_Crc32Append(data, size_bytes, value);
+}