pw_checksum: Rename CRC-16-CCITT files
Change-Id: I34c60c32a1e3ce7d4e1c0fd2314ea967e4dc1118
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/17404
Reviewed-by: Keir Mierle <keir@google.com>
diff --git a/pw_checksum/BUILD b/pw_checksum/BUILD
index 1384325..5ac4a4c 100644
--- a/pw_checksum/BUILD
+++ b/pw_checksum/BUILD
@@ -25,25 +25,26 @@
pw_cc_library(
name = "pw_checksum",
srcs = [
- "ccitt_crc16.cc",
- "crc32.cc"
+ "crc16_ccitt.cc",
+ "crc32.cc",
],
hdrs = [
- "public/pw_checksum/ccitt_crc16.h",
- "public/pw_checksum/crc32.h"
+ "public/pw_checksum/crc16_ccitt.h",
+ "public/pw_checksum/crc32.h",
],
includes = ["public"],
deps = ["//pw_span"],
)
pw_cc_test(
- name = "ccitt_crc16_test",
+ name = "crc16_ccitt_test",
srcs = [
- "ccitt_crc16_test_c.c",
- "ccitt_crc16_test.cc",
+ "crc16_ccitt_test.cc",
+ "crc16_ccitt_test_c.c",
],
deps = [
":pw_checksum",
+ "//pw_bytes",
"//pw_unit_test",
],
)
@@ -51,11 +52,12 @@
pw_cc_test(
name = "crc32_test",
srcs = [
- "crc32_test_c.c",
"crc32_test.cc",
+ "crc32_test_c.c",
],
deps = [
":pw_checksum",
+ "//pw_bytes",
"//pw_unit_test",
],
)
diff --git a/pw_checksum/BUILD.gn b/pw_checksum/BUILD.gn
index aee3320..69e40f3 100644
--- a/pw_checksum/BUILD.gn
+++ b/pw_checksum/BUILD.gn
@@ -25,11 +25,11 @@
pw_source_set("pw_checksum") {
public_configs = [ ":default_config" ]
public = [
- "public/pw_checksum/ccitt_crc16.h",
+ "public/pw_checksum/crc16_ccitt.h",
"public/pw_checksum/crc32.h",
]
sources = [
- "ccitt_crc16.cc",
+ "crc16_ccitt.cc",
"crc32.cc",
]
public_deps = [ dir_pw_span ]
@@ -37,19 +37,19 @@
pw_test_group("tests") {
tests = [
- ":ccitt_crc16_test",
+ ":crc16_ccitt_test",
":crc32_test",
]
}
-pw_test("ccitt_crc16_test") {
+pw_test("crc16_ccitt_test") {
deps = [
":pw_checksum",
dir_pw_bytes,
]
sources = [
- "ccitt_crc16_test.cc",
- "ccitt_crc16_test_c.c",
+ "crc16_ccitt_test.cc",
+ "crc16_ccitt_test_c.c",
]
}
diff --git a/pw_checksum/ccitt_crc16.cc b/pw_checksum/crc16_ccitt.cc
similarity index 98%
rename from pw_checksum/ccitt_crc16.cc
rename to pw_checksum/crc16_ccitt.cc
index 7977185..05ce8e9 100644
--- a/pw_checksum/ccitt_crc16.cc
+++ b/pw_checksum/crc16_ccitt.cc
@@ -12,7 +12,7 @@
// License for the specific language governing permissions and limitations under
// the License.
-#include "pw_checksum/ccitt_crc16.h"
+#include "pw_checksum/crc16_ccitt.h"
namespace pw::checksum {
namespace {
diff --git a/pw_checksum/ccitt_crc16_test.cc b/pw_checksum/crc16_ccitt_test.cc
similarity index 98%
rename from pw_checksum/ccitt_crc16_test.cc
rename to pw_checksum/crc16_ccitt_test.cc
index 49a4d3f..3ac9c78 100644
--- a/pw_checksum/ccitt_crc16_test.cc
+++ b/pw_checksum/crc16_ccitt_test.cc
@@ -12,7 +12,7 @@
// License for the specific language governing permissions and limitations under
// the License.
-#include "pw_checksum/ccitt_crc16.h"
+#include "pw_checksum/crc16_ccitt.h"
#include <string_view>
diff --git a/pw_checksum/ccitt_crc16_test_c.c b/pw_checksum/crc16_ccitt_test_c.c
similarity index 94%
rename from pw_checksum/ccitt_crc16_test_c.c
rename to pw_checksum/crc16_ccitt_test_c.c
index d3ef972..629d3f3 100644
--- a/pw_checksum/ccitt_crc16_test_c.c
+++ b/pw_checksum/crc16_ccitt_test_c.c
@@ -12,7 +12,7 @@
// License for the specific language governing permissions and limitations under
// the License.
-#include "pw_checksum/ccitt_crc16.h"
+#include "pw_checksum/crc16_ccitt.h"
uint16_t CallChecksumCrc16Ccitt(const void* data, size_t size_bytes) {
return pw_checksum_Crc16Ccitt(data, size_bytes, 0xFFFF);
diff --git a/pw_checksum/docs.rst b/pw_checksum/docs.rst
index ed835c1..6157fe6 100644
--- a/pw_checksum/docs.rst
+++ b/pw_checksum/docs.rst
@@ -7,7 +7,7 @@
-----------
The ``pw_checksum`` module provides functions for calculating checksums.
-pw_checksum/ccitt_crc16.h
+pw_checksum/crc16_ccitt.h
=========================
.. cpp:namespace:: pw::checksum
diff --git a/pw_checksum/public/pw_checksum/ccitt_crc16.h b/pw_checksum/public/pw_checksum/crc16_ccitt.h
similarity index 100%
rename from pw_checksum/public/pw_checksum/ccitt_crc16.h
rename to pw_checksum/public/pw_checksum/crc16_ccitt.h
diff --git a/pw_hdlc_lite/decoder.cc b/pw_hdlc_lite/decoder.cc
index 84d3a36..fe2a419 100644
--- a/pw_hdlc_lite/decoder.cc
+++ b/pw_hdlc_lite/decoder.cc
@@ -14,7 +14,7 @@
#include "pw_hdlc_lite/decoder.h"
-#include "pw_checksum/ccitt_crc16.h"
+#include "pw_checksum/crc16_ccitt.h"
#include "pw_log/log.h"
using std::byte;
diff --git a/pw_hdlc_lite/encoder.cc b/pw_hdlc_lite/encoder.cc
index 51c2d76..c956f6f 100644
--- a/pw_hdlc_lite/encoder.cc
+++ b/pw_hdlc_lite/encoder.cc
@@ -20,7 +20,7 @@
#include <cstring>
#include <span>
-#include "pw_checksum/ccitt_crc16.h"
+#include "pw_checksum/crc16_ccitt.h"
using std::byte;
diff --git a/pw_kvs/key_value_store_initialized_test.cc b/pw_kvs/key_value_store_initialized_test.cc
index 74a415a..4bf7e99 100644
--- a/pw_kvs/key_value_store_initialized_test.cc
+++ b/pw_kvs/key_value_store_initialized_test.cc
@@ -19,7 +19,7 @@
#include "gtest/gtest.h"
#include "pw_bytes/array.h"
-#include "pw_checksum/ccitt_crc16.h"
+#include "pw_checksum/crc16_ccitt.h"
#include "pw_kvs/crc16_checksum.h"
#include "pw_kvs/flash_memory.h"
#include "pw_kvs/flash_test_partition.h"
diff --git a/pw_kvs/key_value_store_test.cc b/pw_kvs/key_value_store_test.cc
index 2096a32..02a749e 100644
--- a/pw_kvs/key_value_store_test.cc
+++ b/pw_kvs/key_value_store_test.cc
@@ -29,7 +29,7 @@
#include "gtest/gtest.h"
#include "pw_bytes/array.h"
-#include "pw_checksum/ccitt_crc16.h"
+#include "pw_checksum/crc16_ccitt.h"
#include "pw_kvs/crc16_checksum.h"
#include "pw_kvs/fake_flash_memory.h"
#include "pw_kvs/flash_memory.h"
diff --git a/pw_kvs/public/pw_kvs/crc16_checksum.h b/pw_kvs/public/pw_kvs/crc16_checksum.h
index 9953af4..1cbff63 100644
--- a/pw_kvs/public/pw_kvs/crc16_checksum.h
+++ b/pw_kvs/public/pw_kvs/crc16_checksum.h
@@ -15,7 +15,7 @@
#include <span>
-#include "pw_checksum/ccitt_crc16.h"
+#include "pw_checksum/crc16_ccitt.h"
#include "pw_kvs/checksum.h"
namespace pw::kvs {