settings: put all options under if SETTINGS
Put all options under one `if SETTINGS` block, so that `depends on SETTINGS` does not need to be repeated every time. Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This commit is contained in:
parent
95d8943c69
commit
fb9807da9a
1 changed files with 14 additions and 16 deletions
|
@ -10,27 +10,24 @@ menuconfig SETTINGS
|
||||||
and it can do so atomically for all involved modules.
|
and it can do so atomically for all involved modules.
|
||||||
|
|
||||||
if SETTINGS
|
if SETTINGS
|
||||||
|
|
||||||
module = SETTINGS
|
module = SETTINGS
|
||||||
module-str = settings
|
module-str = settings
|
||||||
source "subsys/logging/Kconfig.template.log_config"
|
source "subsys/logging/Kconfig.template.log_config"
|
||||||
endif
|
|
||||||
|
|
||||||
config SETTINGS_RUNTIME
|
config SETTINGS_RUNTIME
|
||||||
bool "runtime storage back-end"
|
bool "runtime storage back-end"
|
||||||
depends on SETTINGS
|
|
||||||
help
|
help
|
||||||
Enables runtime storage back-end.
|
Enables runtime storage back-end.
|
||||||
|
|
||||||
config SETTINGS_DYNAMIC_HANDLERS
|
config SETTINGS_DYNAMIC_HANDLERS
|
||||||
bool "dynamic settings handlers"
|
bool "dynamic settings handlers"
|
||||||
depends on SETTINGS
|
|
||||||
default y
|
default y
|
||||||
help
|
help
|
||||||
Enables the use of dynamic settings handlers
|
Enables the use of dynamic settings handlers
|
||||||
|
|
||||||
# Hidden option to enable encoding length into settings entry
|
# Hidden option to enable encoding length into settings entry
|
||||||
config SETTINGS_ENCODE_LEN
|
config SETTINGS_ENCODE_LEN
|
||||||
depends on SETTINGS
|
|
||||||
bool
|
bool
|
||||||
|
|
||||||
choice SETTINGS_BACKEND
|
choice SETTINGS_BACKEND
|
||||||
|
@ -39,7 +36,6 @@ choice SETTINGS_BACKEND
|
||||||
default SETTINGS_FCB if FCB
|
default SETTINGS_FCB if FCB
|
||||||
default SETTINGS_FILE if FILE_SYSTEM
|
default SETTINGS_FILE if FILE_SYSTEM
|
||||||
default SETTINGS_NONE
|
default SETTINGS_NONE
|
||||||
depends on SETTINGS
|
|
||||||
help
|
help
|
||||||
Storage back-end to be used by the settings subsystem.
|
Storage back-end to be used by the settings subsystem.
|
||||||
|
|
||||||
|
@ -103,7 +99,7 @@ endchoice
|
||||||
config SETTINGS_FCB_NUM_AREAS
|
config SETTINGS_FCB_NUM_AREAS
|
||||||
int "Number of flash areas used by the settings subsystem"
|
int "Number of flash areas used by the settings subsystem"
|
||||||
default 8
|
default 8
|
||||||
depends on SETTINGS && SETTINGS_FCB
|
depends on SETTINGS_FCB
|
||||||
help
|
help
|
||||||
Number of areas to allocate in the settings FCB. A smaller number is
|
Number of areas to allocate in the settings FCB. A smaller number is
|
||||||
used if the flash hardware cannot support this value.
|
used if the flash hardware cannot support this value.
|
||||||
|
@ -111,56 +107,56 @@ config SETTINGS_FCB_NUM_AREAS
|
||||||
config SETTINGS_FCB_MAGIC
|
config SETTINGS_FCB_MAGIC
|
||||||
hex "FCB magic for the settings subsystem"
|
hex "FCB magic for the settings subsystem"
|
||||||
default 0xc0ffeeee
|
default 0xc0ffeeee
|
||||||
depends on SETTINGS && SETTINGS_FCB
|
depends on SETTINGS_FCB
|
||||||
help
|
help
|
||||||
Magic 32-bit word for to identify valid settings area
|
Magic 32-bit word for to identify valid settings area
|
||||||
|
|
||||||
config SETTINGS_FILE_DIR
|
config SETTINGS_FILE_DIR
|
||||||
string "Serialization directory"
|
string "Serialization directory"
|
||||||
default "/settings"
|
default "/settings"
|
||||||
depends on SETTINGS && SETTINGS_FILE
|
depends on SETTINGS_FILE
|
||||||
help
|
help
|
||||||
Directory where the settings data is stored
|
Directory where the settings data is stored
|
||||||
|
|
||||||
config SETTINGS_FILE_PATH
|
config SETTINGS_FILE_PATH
|
||||||
string "Default settings file"
|
string "Default settings file"
|
||||||
default "/settings/run"
|
default "/settings/run"
|
||||||
depends on SETTINGS && SETTINGS_FILE
|
depends on SETTINGS_FILE
|
||||||
help
|
help
|
||||||
Full path to the default settings file.
|
Full path to the default settings file.
|
||||||
|
|
||||||
config SETTINGS_FILE_MAX_LINES
|
config SETTINGS_FILE_MAX_LINES
|
||||||
int "Compression threshold"
|
int "Compression threshold"
|
||||||
default 32
|
default 32
|
||||||
depends on SETTINGS && SETTINGS_FILE
|
depends on SETTINGS_FILE
|
||||||
help
|
help
|
||||||
Limit how many items stored in a file before compressing
|
Limit how many items stored in a file before compressing
|
||||||
|
|
||||||
config SETTINGS_FS_DIR
|
config SETTINGS_FS_DIR
|
||||||
string "Serialization directory (DEPRECATED)"
|
string "Serialization directory (DEPRECATED)"
|
||||||
default "/settings"
|
default "/settings"
|
||||||
depends on SETTINGS && SETTINGS_FS
|
depends on SETTINGS_FS
|
||||||
help
|
help
|
||||||
This is deprecated. Use SETTINGS_FILE_DIR instead.
|
This is deprecated. Use SETTINGS_FILE_DIR instead.
|
||||||
|
|
||||||
config SETTINGS_FS_FILE
|
config SETTINGS_FS_FILE
|
||||||
string "Default settings file (DEPRECATED)"
|
string "Default settings file (DEPRECATED)"
|
||||||
default "/settings/run"
|
default "/settings/run"
|
||||||
depends on SETTINGS && SETTINGS_FS
|
depends on SETTINGS_FS
|
||||||
help
|
help
|
||||||
This is deprecated. Use SETTINGS_FILE_PATH instead.
|
This is deprecated. Use SETTINGS_FILE_PATH instead.
|
||||||
|
|
||||||
config SETTINGS_FS_MAX_LINES
|
config SETTINGS_FS_MAX_LINES
|
||||||
int "Compression threshold (DEPRECATED)"
|
int "Compression threshold (DEPRECATED)"
|
||||||
default 32
|
default 32
|
||||||
depends on SETTINGS && SETTINGS_FS
|
depends on SETTINGS_FS
|
||||||
help
|
help
|
||||||
This is deprecated. Use SETTINGS_FILE_MAX_LINES instead.
|
This is deprecated. Use SETTINGS_FILE_MAX_LINES instead.
|
||||||
|
|
||||||
config SETTINGS_NVS_SECTOR_SIZE_MULT
|
config SETTINGS_NVS_SECTOR_SIZE_MULT
|
||||||
int "Sector size of the NVS settings area"
|
int "Sector size of the NVS settings area"
|
||||||
default 1
|
default 1
|
||||||
depends on SETTINGS && SETTINGS_NVS
|
depends on SETTINGS_NVS
|
||||||
help
|
help
|
||||||
The sector size to use for the NVS settings area as a multiple of
|
The sector size to use for the NVS settings area as a multiple of
|
||||||
FLASH_ERASE_BLOCK_SIZE.
|
FLASH_ERASE_BLOCK_SIZE.
|
||||||
|
@ -168,15 +164,17 @@ config SETTINGS_NVS_SECTOR_SIZE_MULT
|
||||||
config SETTINGS_NVS_SECTOR_COUNT
|
config SETTINGS_NVS_SECTOR_COUNT
|
||||||
int "Sector count of the NVS settings area"
|
int "Sector count of the NVS settings area"
|
||||||
default 8
|
default 8
|
||||||
depends on SETTINGS && SETTINGS_NVS
|
depends on SETTINGS_NVS
|
||||||
help
|
help
|
||||||
Number of sectors used for the NVS settings area
|
Number of sectors used for the NVS settings area
|
||||||
|
|
||||||
config SETTINGS_SHELL
|
config SETTINGS_SHELL
|
||||||
bool "Settings shell"
|
bool "Settings shell"
|
||||||
depends on SETTINGS && SHELL
|
depends on SHELL
|
||||||
help
|
help
|
||||||
Enable shell commands for listing and reading the settings. Note that
|
Enable shell commands for listing and reading the settings. Note that
|
||||||
reading the settings requires quite a big stack buffer, so the stack
|
reading the settings requires quite a big stack buffer, so the stack
|
||||||
size of the shell thread may need to be increased to accommodate this
|
size of the shell thread may need to be increased to accommodate this
|
||||||
feature.
|
feature.
|
||||||
|
|
||||||
|
endif # SETTINGS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue