1 /* 2 * Copyright (c) 2018 Nordic Semiconductor ASA 3 * Copyright (c) 2015 Runtime Inc 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8 #ifndef __SETTINGS_FILE_H_ 9 #define __SETTINGS_FILE_H_ 10 11 #include "settings/settings.h" 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 #define SETTINGS_FILE_NAME_MAX 32 /* max length for settings filename */ 18 19 struct settings_file { 20 struct settings_store cf_store; 21 const char *cf_name; /* filename */ 22 int cf_maxlines; /* max # of lines before compressing */ 23 int cf_lines; /* private */ 24 }; 25 26 /* register file to be source of settings */ 27 int settings_file_src(struct settings_file *cf); 28 29 /* settings saves go to a file */ 30 int settings_file_dst(struct settings_file *cf); 31 32 void settings_mount_fs_backend(struct settings_file *cf); 33 34 #ifdef __cplusplus 35 } 36 #endif 37 38 #endif /* __SETTINGS_FILE_H_ */ 39