feat: Add function to erase all settings

Added a zmk_settings_erase() function to clear all saved settings. This
does not go through Zephyr's settings subsystem, but instead directly
clears the data from the setting storage backend, so a reboot is needed
for it to take effect.
This commit is contained in:
Joel Spadin
2023-11-26 12:27:12 -06:00
committed by Pete Johanson
parent 2adaa00d10
commit 610a806c84
7 changed files with 112 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
/**
* Erases all saved settings.
*
* @note This does not automatically update any code using Zephyr's settings
* subsystem. This should typically be followed by a call to sys_reboot().
*/
int zmk_settings_erase(void);