From 6daf046e8f315a30498bb8c5ca958581de57dd0d Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Thu, 14 Dec 2017 13:44:49 -0500 Subject: [PATCH] lib: move crc from drivers to lib/ Signed-off-by: Anas Nashif --- drivers/CMakeLists.txt | 1 - lib/CMakeLists.txt | 3 ++- {drivers => lib}/crc/CMakeLists.txt | 0 {drivers => lib}/crc/crc16_sw.c | 0 tests/unit/{drivers => lib}/crc/CMakeLists.txt | 2 -- tests/unit/{drivers => lib}/crc/main.c | 2 +- tests/unit/{drivers => lib}/crc/testcase.yaml | 0 7 files changed, 3 insertions(+), 5 deletions(-) rename {drivers => lib}/crc/CMakeLists.txt (100%) rename {drivers => lib}/crc/crc16_sw.c (100%) rename tests/unit/{drivers => lib}/crc/CMakeLists.txt (70%) rename tests/unit/{drivers => lib}/crc/main.c (94%) rename tests/unit/{drivers => lib}/crc/testcase.yaml (100%) diff --git a/drivers/CMakeLists.txt b/drivers/CMakeLists.txt index 320c0156b45..9ae81896771 100644 --- a/drivers/CMakeLists.txt +++ b/drivers/CMakeLists.txt @@ -1,5 +1,4 @@ add_subdirectory(console) -add_subdirectory(crc) add_subdirectory(display) add_subdirectory(interrupt_controller) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index c0fdc7a1951..ea4d2978221 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,2 +1,3 @@ -add_subdirectory(libc) +add_subdirectory(crc) add_subdirectory_ifdef(CONFIG_JSON_LIBRARY json) +add_subdirectory(libc) diff --git a/drivers/crc/CMakeLists.txt b/lib/crc/CMakeLists.txt similarity index 100% rename from drivers/crc/CMakeLists.txt rename to lib/crc/CMakeLists.txt diff --git a/drivers/crc/crc16_sw.c b/lib/crc/crc16_sw.c similarity index 100% rename from drivers/crc/crc16_sw.c rename to lib/crc/crc16_sw.c diff --git a/tests/unit/drivers/crc/CMakeLists.txt b/tests/unit/lib/crc/CMakeLists.txt similarity index 70% rename from tests/unit/drivers/crc/CMakeLists.txt rename to tests/unit/lib/crc/CMakeLists.txt index 9e30fa8d89a..3baa1c5b525 100644 --- a/tests/unit/drivers/crc/CMakeLists.txt +++ b/tests/unit/lib/crc/CMakeLists.txt @@ -1,5 +1,3 @@ -list(APPEND INCLUDE subsys) - include($ENV{ZEPHYR_BASE}/tests/unit/unittest.cmake) project(none) diff --git a/tests/unit/drivers/crc/main.c b/tests/unit/lib/crc/main.c similarity index 94% rename from tests/unit/drivers/crc/main.c rename to tests/unit/lib/crc/main.c index 8712ffd9203..e672baba106 100644 --- a/tests/unit/drivers/crc/main.c +++ b/tests/unit/lib/crc/main.c @@ -6,7 +6,7 @@ #include -#include +#include void test_crc16(void) { diff --git a/tests/unit/drivers/crc/testcase.yaml b/tests/unit/lib/crc/testcase.yaml similarity index 100% rename from tests/unit/drivers/crc/testcase.yaml rename to tests/unit/lib/crc/testcase.yaml