diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 83cd7d0..f23d0d8 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,2 +1 @@ add_subdirectory_ifdef(CONFIG_FANCY_ZTEST fancy_ztest) -add_subdirectory_ifdef(CONFIG_EXAMPLE_LIB example_lib) diff --git a/lib/Kconfig b/lib/Kconfig index 0040acb..ce780c2 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -1,6 +1,5 @@ menu "Libraries" rsource "fancy_ztest/Kconfig" -rsource "example_lib/Kconfig" endmenu diff --git a/lib/example_lib/CMakeLists.txt b/lib/example_lib/CMakeLists.txt deleted file mode 100644 index 8a6e9a9..0000000 --- a/lib/example_lib/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -zephyr_library() -zephyr_library_sources(example_lib.c) - -zephyr_include_directories(.) diff --git a/lib/example_lib/Kconfig b/lib/example_lib/Kconfig deleted file mode 100644 index 5ceb443..0000000 --- a/lib/example_lib/Kconfig +++ /dev/null @@ -1,5 +0,0 @@ -config EXAMPLE_LIB - bool "example_lib support" - help - This option enables the example_lib library. - This lib is used to demonstrate unit tests in ../tests/sample_test. diff --git a/lib/example_lib/example_lib.c b/lib/example_lib/example_lib.c deleted file mode 100644 index 04e1130..0000000 --- a/lib/example_lib/example_lib.c +++ /dev/null @@ -1,16 +0,0 @@ -/** @file example_lib.c - * - * @brief Example library implementation. - */ - -#include "example_lib.h" - -int example_lib_calculate(bool add, int a, int b) -{ - if (add) { - return a + b; - - } else { - return a - b; - } -} diff --git a/lib/example_lib/example_lib.h b/lib/example_lib/example_lib.h deleted file mode 100644 index 0c12d4b..0000000 --- a/lib/example_lib/example_lib.h +++ /dev/null @@ -1,30 +0,0 @@ -/** @file example_lib.h - * - * @brief Example library implementation. - */ - -#ifndef EXAMPLE_LIB_H -#define EXAMPLE_LIB_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/** - * @brief Run a mathematical operation on the two numbers. - * - * @param[in] add If true, add the two numbers. Otherwise, subtract them. - * @param[in] a - * @param[in] b - * - * @return The result of the operation. - */ -int example_lib_calculate(bool add, int a, int b); - -#ifdef __cplusplus -} -#endif - -#endif /* EXAMPLE_LIB_H */