fix: Update settings reset for Zephyr 3.5

This commit is contained in:
Joel Spadin 2024-02-24 12:14:37 -06:00 committed by Pete Johanson
parent 14b06a36bf
commit a77288f527

View File

@ -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);