From e50d42c8017d202172dc267e5866d06ba50a1339 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Fri, 9 Jul 2021 17:27:54 +0200 Subject: [PATCH] app: delete foo sample code The initial idea behind this code was to showcase documentation. It does not add any special value to the sample, so remove it. A proper library can be added in the future. Signed-off-by: Gerard Marull-Paretas --- app/CMakeLists.txt | 2 +- app/src/foo.c | 11 ----------- app/src/foo.h | 30 ------------------------------ app/src/main.c | 7 ------- 4 files changed, 1 insertion(+), 49 deletions(-) delete mode 100644 app/src/foo.c delete mode 100644 app/src/foo.h diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 8b768ad..442c112 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -12,4 +12,4 @@ project(app LANGUAGES C VERSION 1.0.0) configure_file(app_version.h.in ${CMAKE_BINARY_DIR}/app/include/app_version.h) target_include_directories(app PRIVATE ${CMAKE_BINARY_DIR}/app/include src) -target_sources(app PRIVATE src/main.c src/foo.c) +target_sources(app PRIVATE src/main.c) diff --git a/app/src/foo.c b/app/src/foo.c deleted file mode 100644 index 63e2d71..0000000 --- a/app/src/foo.c +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) 2021 Nordic Semiconductor ASA - * SPDX-License-Identifier: Apache-2.0 - */ - -#include "foo.h" - -int app_foo_bar(void) -{ - return 0; -} diff --git a/app/src/foo.h b/app/src/foo.h deleted file mode 100644 index 34d8e1e..0000000 --- a/app/src/foo.h +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @file foo.h - * - * Foo API. - * - * Copyright (c) 2021 Nordic Semiconductor ASA - * SPDX-License-Identifier: Apache-2.0 - */ - -#ifndef _FOO_H_ -#define _FOO_H_ - -/** - * @defgroup app_foo Foo API - * - * A detailed description of the foo API. - * - * @{ - */ - -/** - * @brief An example foo API call. - * - * @return 0 on success, negative errno otherwise. - */ -int app_foo_bar(void); - -/** @} */ - -#endif /* _FOO_H_ */ diff --git a/app/src/main.c b/app/src/main.c index 158dbee..6663a43 100644 --- a/app/src/main.c +++ b/app/src/main.c @@ -7,7 +7,6 @@ #include #include "app_version.h" -#include "foo.h" #include LOG_MODULE_REGISTER(main, CONFIG_APP_LOG_LEVEL); @@ -19,12 +18,6 @@ void main(void) printk("Zephyr Example Application %s\n", APP_VERSION_STR); - ret = app_foo_bar(); - if (ret < 0) { - LOG_ERR("app_foo_bar failed (%d)", ret); - return; - } - sensor = DEVICE_DT_GET(DT_NODELABEL(examplesensor0)); if (!device_is_ready(sensor)) { LOG_ERR("Sensor not ready");