diff options
| author | xengineering <me@xengineering.eu> | 2025-04-13 08:27:20 +0200 | 
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2025-04-15 17:43:25 +0200 | 
| commit | 4e0f0849d6e7997cbc128d998ba824d6ac3e7181 (patch) | |
| tree | 02f0ecf0962f8132daae6b07ca40fd23512b55cd /fw/app/src | |
| parent | 015972d873627466bd7e40f8d5dbb5951fb0f36a (diff) | |
| download | iot-contact-4e0f0849d6e7997cbc128d998ba824d6ac3e7181.tar iot-contact-4e0f0849d6e7997cbc128d998ba824d6ac3e7181.tar.zst iot-contact-4e0f0849d6e7997cbc128d998ba824d6ac3e7181.zip  | |
fw: app: Enable settings with NVS backend
Diffstat (limited to 'fw/app/src')
| -rw-r--r-- | fw/app/src/settings.c | 26 | 
1 files changed, 26 insertions, 0 deletions
diff --git a/fw/app/src/settings.c b/fw/app/src/settings.c new file mode 100644 index 0000000..11cc162 --- /dev/null +++ b/fw/app/src/settings.c @@ -0,0 +1,26 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at https://mozilla.org/MPL/2.0/. + */ + + +#include <zephyr/init.h> +#include <zephyr/logging/log.h> +#include <zephyr/settings/settings.h> + + +LOG_MODULE_DECLARE(settings); + + +int init_settings(void) { +	int ret = settings_subsys_init(); +	if (ret < 0) { +		LOG_ERR("Subsystem init failed (%d)", ret); +		return ret; +	} +	LOG_INF("Subsystem initialized"); + +	return 0; +} +SYS_INIT(init_settings, APPLICATION, 50);  | 
