Add default hostname Kconfig item

This commit is contained in:
Camden Dixie O'Brien 2023-05-15 11:34:23 +01:00
parent d7f1c2ace0
commit 81dfa7fe1c
2 changed files with 10 additions and 1 deletions

View File

@ -33,7 +33,10 @@ typedef struct {
} Item;
static Item state[ITEM_COUNT] = {
[HOSTNAME] = { .id = "hostname", .default_value = "bedside-clock" },
[HOSTNAME] = {
.id = "hostname",
.default_value = CONFIG_DEFAULT_HOSTNAME,
},
};
static bool load(ItemIndex item)

6
main/Kconfig.projbuild Normal file
View File

@ -0,0 +1,6 @@
menu "Bedside clock settings"
config DEFAULT_HOSTNAME
string "The default hostname for the device"
default "bedside-clock"
prompt "Default hostname"
endmenu