Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/config: Make the maximum value length configurable #2693

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion sys/config/include/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <os/queue.h>
#include <stdint.h>
#include <stdbool.h>
#include <syscfg/syscfg.h>

#ifdef __cplusplus
extern "C" {
Expand All @@ -36,7 +37,7 @@ extern "C" {

#define CONF_MAX_DIR_DEPTH 8 /* max depth of config tree */
#define CONF_MAX_NAME_LEN (8 * CONF_MAX_DIR_DEPTH)
#define CONF_MAX_VAL_LEN 256
#define CONF_MAX_VAL_LEN MYNEWT_VAL(CONFIG_MAX_VAL_LEN)
#define CONF_NAME_SEPARATOR "/"

#define CONF_NMGR_OP 0
Expand Down
4 changes: 4 additions & 0 deletions sys/config/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ syscfg.defs:
description: >
Config CLI commands read 1, write 2, read/write 3
value: 3
CONFIG_MAX_VAL_LEN:
description: >
Max length of a value stored in the config FCB.
value: 256

syscfg.defs.(CONFIG_FCB || CONFIG_FCB2):
CONFIG_FCB_FLASH_AREA:
Expand Down