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/BUILD.gn b/pw_checksum/BUILD.gn
index 43da086..aee3320 100644
--- a/pw_checksum/BUILD.gn
+++ b/pw_checksum/BUILD.gn
@@ -43,7 +43,10 @@
}
pw_test("ccitt_crc16_test") {
- deps = [ ":pw_checksum" ]
+ deps = [
+ ":pw_checksum",
+ dir_pw_bytes,
+ ]
sources = [
"ccitt_crc16_test.cc",
"ccitt_crc16_test_c.c",
@@ -51,7 +54,10 @@
}
pw_test("crc32_test") {
- deps = [ ":pw_checksum" ]
+ deps = [
+ ":pw_checksum",
+ dir_pw_bytes,
+ ]
sources = [
"crc32_test.cc",
"crc32_test_c.c",