fix: Update settings reset for Zephyr 3.5
This commit is contained in:
parent
14b06a36bf
commit
a77288f527
1 changed files with 1 additions and 7 deletions
|
@ -4,16 +4,10 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <zephyr/device.h>
|
||||
#include <zephyr/init.h>
|
||||
|
||||
#include <zmk/settings.h>
|
||||
|
||||
static int reset_settings_init(const struct device *dev) {
|
||||
ARG_UNUSED(dev);
|
||||
return zmk_settings_erase();
|
||||
}
|
||||
|
||||
// Reset after the kernel is initialized but before any application code to
|
||||
// ensure settings are cleared before anything tries to use them.
|
||||
SYS_INIT(reset_settings_init, POST_KERNEL, CONFIG_APPLICATION_INIT_PRIORITY);
|
||||
SYS_INIT(zmk_settings_erase, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
|
|
Loading…
Add table
Reference in a new issue