diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 054f84a7..bb4af555 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -55,4 +55,5 @@ target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/hog.c) target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c) target_sources(app PRIVATE src/endpoints.c) target_sources(app PRIVATE src/hid_listener.c) +target_sources(app PRIVATE src/settings.c) target_sources(app PRIVATE src/main.c) diff --git a/app/src/rgb_underglow.c b/app/src/rgb_underglow.c index 86223b17..3851421b 100644 --- a/app/src/rgb_underglow.c +++ b/app/src/rgb_underglow.c @@ -15,7 +15,6 @@ #include #include -#include LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); @@ -106,6 +105,16 @@ static struct led_rgb hsb_to_rgb(struct led_hsb hsb) return rgb; } +static void zmk_rgb_underglow_off() +{ + for (int i=0; i +#include +#include +#include + +static int zmk_settings_init(struct device *_arg) +{ + return settings_load(); +} + +SYS_INIT(zmk_settings_init, + APPLICATION, + CONFIG_APPLICATION_INIT_PRIORITY);