diff --git a/app/Kconfig b/app/Kconfig index 5aedd9d9..94b1572f 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -635,6 +635,16 @@ config ZMK_SETTINGS_SAVE_DEBOUNCE int "Milliseconds to debounce settings saves" default 60000 +config ZMK_SETTINGS_SAVE_ENDPOINTS + bool "save endpoints configuration" + depends on CONFIG_SETTINGS + default y + +config ZMK_SETTINGS_SAVE_EXT_POWER + bool "save ext power state" + depends on CONFIG_SETTINGS + default y + #SETTINGS endif diff --git a/app/src/endpoints.c b/app/src/endpoints.c index 7c9d15a3..db70401a 100644 --- a/app/src/endpoints.c +++ b/app/src/endpoints.c @@ -41,7 +41,7 @@ static struct k_work_delayable endpoints_save_work; #endif static int endpoints_save_preferred(void) { -#if IS_ENABLED(CONFIG_SETTINGS) +#if IS_ENABLED(CONFIG_ZMK_SETTINGS_SAVE_ENDPOINTS) return k_work_reschedule(&endpoints_save_work, K_MSEC(CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE)); #else return 0; diff --git a/app/src/ext_power_generic.c b/app/src/ext_power_generic.c index 2586f436..b18c7a78 100644 --- a/app/src/ext_power_generic.c +++ b/app/src/ext_power_generic.c @@ -47,7 +47,7 @@ static struct k_work_delayable ext_power_save_work; #endif int ext_power_save_state(void) { -#if IS_ENABLED(CONFIG_SETTINGS) +#if IS_ENABLED(CONFIG_ZMK_SETTINGS_SAVE_EXT_POWER) int ret = k_work_reschedule(&ext_power_save_work, K_MSEC(CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE)); return MIN(ret, 0); #else