- 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.
64 lines
2.3 KiB
Plaintext
64 lines
2.3 KiB
Plaintext
menu "Relay Channel Driver Configuration"
|
|
|
|
config RELAY_CHN_OPPOSITE_INERTIA_MS
|
|
int "Inertia time before it runs opposite direction (ms)"
|
|
range 200 1500
|
|
default 800
|
|
help
|
|
Time to wait after changing the direction of the output before
|
|
starting the output. This is useful for the motors or some other
|
|
mechanical actuators to allow them to stop and settle before
|
|
changing the direction.
|
|
|
|
config RELAY_CHN_COUNT
|
|
int "Number of relay channels"
|
|
range 1 8
|
|
default 1
|
|
help
|
|
Number of relay channels between 1 and 8.
|
|
|
|
config RELAY_CHN_ENABLE_TILTING
|
|
bool "Enable tilting on relay channels"
|
|
default n
|
|
help
|
|
This option controls enabling tilting on channels. Tilting makes
|
|
a channel move with a specific pattern moving with small steps
|
|
at a time. Tilting is specifically designed for controlling some
|
|
types of curtains that need to be adjusted to let enter specific
|
|
amount of day light.
|
|
|
|
config RELAY_CHN_ENABLE_NVS
|
|
bool "Enable persistent NVS storage for relay channel"
|
|
default n
|
|
help
|
|
If enabled, relay channel configuration will be stored in NVS.
|
|
|
|
endmenu
|
|
|
|
menu "Relay Channel NVS Storage Configuration"
|
|
depends on RELAY_CHN_ENABLE_NVS
|
|
|
|
config RELAY_CHN_NVS_NAMESPACE
|
|
string "NVS namespace for relay channel storage"
|
|
default "relay_chn"
|
|
help
|
|
The NVS namespace used for storing relay channel configuration.
|
|
This should be unique to avoid conflicts with other components.
|
|
|
|
config RELAY_CHN_NVS_CUSTOM_PARTITION
|
|
bool "Use custom NVS partition for relay channel storage"
|
|
default n
|
|
help
|
|
If enabled, a custom NVS partition will be used for storing
|
|
relay channel configuration. If disabled, the default NVS
|
|
partition will be used.
|
|
|
|
config RELAY_CHN_NVS_CUSTOM_PARTITION_NAME
|
|
string "Custom NVS partition name"
|
|
depends on RELAY_CHN_NVS_CUSTOM_PARTITION
|
|
default "app_data"
|
|
help
|
|
The name of the custom NVS partition used for storing relay channel
|
|
configuration. Make sure the name is exactly the same as label defined
|
|
in the relevant partition table.
|
|
endmenu |