Started the implementation of the persistency module allowing to save and retrieve settings
This commit is contained in:
parent
74d48ada96
commit
666a841026
@ -32,6 +32,7 @@ endif
|
||||
COMPONENTS_$(TARGET) = \
|
||||
$(TOP_DIR)/app/libuser$(LIB_EXT) \
|
||||
$(TOP_DIR)/app/app_drivers/libappdrivers$(LIB_EXT) \
|
||||
$(TOP_DIR)/app/persistency/libpersistency$(LIB_EXT) \
|
||||
$(TOP_DIR)/lvgl/liblvgl$(LIB_EXT)
|
||||
|
||||
ifeq ($(USE_LIB), 0)
|
||||
|
13
src/W800 SDK v1.00.08/app/persistency/watch_settings.c
Normal file
13
src/W800 SDK v1.00.08/app/persistency/watch_settings.c
Normal file
@ -0,0 +1,13 @@
|
||||
#include "watch_settings.h"
|
||||
|
||||
/* WatchSetting object with default values */
|
||||
static WatchSettings_t watchSettings =
|
||||
{
|
||||
.timeAndDate = {.config = 0},
|
||||
.display = {.brightness = 255, .sleep_timeout = 10,},
|
||||
};
|
||||
|
||||
WatchSettings_t *persistency_get_settings(void)
|
||||
{
|
||||
return &watchSettings;
|
||||
}
|
@ -41,4 +41,10 @@ typedef struct WatchSettings
|
||||
LanguageAndUI_t languageAndUI;
|
||||
} WatchSettings_t;
|
||||
|
||||
WatchSettings_t *persistency_get_settings(void);
|
||||
|
||||
bool persistency_save_settings(void);
|
||||
|
||||
bool persistency_load_settings(void);
|
||||
|
||||
#endif //WATCH_SETTINGS_H
|
Loading…
Reference in New Issue
Block a user