From 5fccab5afff029efc630946c90598d76f4678244 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 11 Dec 2025 00:56:54 +0100 Subject: [PATCH] Refactor: storage in separate component ausgelagert --- firmware/components/storage/CMakeLists.txt | 9 +++++++++ firmware/{src => components/storage/include}/storage.h | 0 firmware/{ => components/storage}/src/storage.c | 0 firmware/src/CMakeLists.txt | 3 +-- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 firmware/components/storage/CMakeLists.txt rename firmware/{src => components/storage/include}/storage.h (100%) rename firmware/{ => components/storage}/src/storage.c (100%) diff --git a/firmware/components/storage/CMakeLists.txt b/firmware/components/storage/CMakeLists.txt new file mode 100644 index 0000000..eb73c1f --- /dev/null +++ b/firmware/components/storage/CMakeLists.txt @@ -0,0 +1,9 @@ +idf_component_register( + SRCS + "src/storage.c" + INCLUDE_DIRS + "include" + REQUIRES + nvs_flash +) + diff --git a/firmware/src/storage.h b/firmware/components/storage/include/storage.h similarity index 100% rename from firmware/src/storage.h rename to firmware/components/storage/include/storage.h diff --git a/firmware/src/storage.c b/firmware/components/storage/src/storage.c similarity index 100% rename from firmware/src/storage.c rename to firmware/components/storage/src/storage.c diff --git a/firmware/src/CMakeLists.txt b/firmware/src/CMakeLists.txt index d565835..39a5c3d 100644 --- a/firmware/src/CMakeLists.txt +++ b/firmware/src/CMakeLists.txt @@ -5,7 +5,6 @@ set(app_sources "net_influx.c" "net_mdns.c" "sen5x_app.c" - "storage.c" "sys_status.c" "wifi_mgr.c" ) @@ -13,5 +12,5 @@ set(app_sources idf_component_register( SRCS ${app_sources} INCLUDE_DIRS "." - REQUIRES dns_captive + REQUIRES dns_captive storage )