Add NVS support for relay channel config persistence

- Introduced NVS configuration options in Kconfig.
- Implemented NVS initialization and deinitialization in relay_chn_core.
- Added functions for storing and retrieving relay channel direction and tilt sensitivity in NVS.
- Updated relay_chn_tilt and relay_chn_output to utilize NVS for state management.
- Created relay_chn_nvs.c and relay_chn_nvs.h for NVS-related functionalities.

Closes #1074.
This commit is contained in:
2025-08-19 17:33:45 +03:00
parent f04632dc77
commit b19f0c553b
8 changed files with 490 additions and 23 deletions

View File

@@ -15,7 +15,12 @@ else()
list(APPEND srcs "src/relay_chn_ctl_single.c")
endif()
if(CONFIG_RELAY_CHN_NVS)
list(APPEND srcs "src/relay_chn_nvs.c")
endif()
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${include_dirs}
PRIV_INCLUDE_DIRS ${priv_include_dirs}
REQUIRES driver esp_timer esp_event)
REQUIRES driver esp_timer esp_event nvs_flash)