fix: Improve startup time with proper settings loading.

* Avoid doing duplicate calls to setings_load_subtree, which iterates
  NVS fully each time under the hood, and instead use on settings_load
  later in the lifecycle.
This commit is contained in:
Peter Johanson
2024-07-03 02:33:26 -06:00
committed by Pete Johanson
parent f18974e8c4
commit 80173f8ea3
11 changed files with 129 additions and 102 deletions

View File

@@ -11,7 +11,12 @@
#define ZMK_BEHAVIOR_OPAQUE 0
#define ZMK_BEHAVIOR_TRANSPARENT 1
typedef uint16_t zmk_behavior_local_id_t;
struct zmk_behavior_binding {
#if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_LOCAL_IDS_IN_BINDINGS)
zmk_behavior_local_id_t local_id;
#endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_LOCAL_IDS_IN_BINDINGS)
const char *behavior_dev;
uint32_t param1;
uint32_t param2;
@@ -23,8 +28,6 @@ struct zmk_behavior_binding_event {
int64_t timestamp;
};
typedef uint16_t zmk_behavior_local_id_t;
/**
* @brief Get a const struct device* for a behavior from its @p name field.
*