From f72185ed3661058e85f578501e09004710429d18 Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 15 Apr 2025 10:38:03 +0200 Subject: fw: app: Rename to settings.c --- fw/app/CMakeLists.txt | 2 +- fw/app/src/boot-count.c | 26 -------------------------- fw/app/src/settings.c | 26 ++++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 27 deletions(-) delete mode 100644 fw/app/src/boot-count.c create mode 100644 fw/app/src/settings.c diff --git a/fw/app/CMakeLists.txt b/fw/app/CMakeLists.txt index b090c47..de1c418 100644 --- a/fw/app/CMakeLists.txt +++ b/fw/app/CMakeLists.txt @@ -19,7 +19,7 @@ target_sources(app "${CMAKE_CURRENT_SOURCE_DIR}/src/http.c" "${CMAKE_CURRENT_SOURCE_DIR}/src/ws.c" "${CMAKE_CURRENT_SOURCE_DIR}/src/heart.c" - "${CMAKE_CURRENT_SOURCE_DIR}/src/boot-count.c" + "${CMAKE_CURRENT_SOURCE_DIR}/src/settings.c" ) target_sources_ifdef( diff --git a/fw/app/src/boot-count.c b/fw/app/src/boot-count.c deleted file mode 100644 index 0b944e2..0000000 --- a/fw/app/src/boot-count.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public License, - * v. 2.0. If a copy of the MPL was not distributed with this file, You can - * obtain one at https://mozilla.org/MPL/2.0/. - */ - - -#include -#include -#include - - -LOG_MODULE_REGISTER(boot_count); - - -int init_settings(void) { - int ret = settings_subsys_init(); - if (ret < 0) { - LOG_ERR("Failed to init settings subsystem (%d)", ret); - return ret; - } - LOG_INF("Settings subsystem initialized"); - - return 0; -} -SYS_INIT(init_settings, APPLICATION, 50); diff --git a/fw/app/src/settings.c b/fw/app/src/settings.c new file mode 100644 index 0000000..11cc162 --- /dev/null +++ b/fw/app/src/settings.c @@ -0,0 +1,26 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at https://mozilla.org/MPL/2.0/. + */ + + +#include +#include +#include + + +LOG_MODULE_DECLARE(settings); + + +int init_settings(void) { + int ret = settings_subsys_init(); + if (ret < 0) { + LOG_ERR("Subsystem init failed (%d)", ret); + return ret; + } + LOG_INF("Subsystem initialized"); + + return 0; +} +SYS_INIT(init_settings, APPLICATION, 50); -- cgit v1.2.3-70-g09d2