mirror of https://github.com/zmkfirmware/zmk.git
load settings on POST_KERNEL step
This commit is contained in:
parent
40e06f3c00
commit
fcec2125c0
|
|
@ -17,16 +17,22 @@ LOG_MODULE_REGISTER(zmk, CONFIG_ZMK_LOG_LEVEL);
|
|||
#include <zmk/display.h>
|
||||
#include <lvgl.h>
|
||||
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_SETTINGS)
|
||||
static int settings_init(const struct device *dev) {
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
settings_subsys_init();
|
||||
settings_load();
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(settings_init, POST_KERNEL, 0);
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
LOG_INF("Welcome to ZMK!\n");
|
||||
|
||||
#if IS_ENABLED(CONFIG_SETTINGS)
|
||||
settings_subsys_init();
|
||||
settings_load();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ZMK_DISPLAY
|
||||
zmk_display_init();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue