#pragma once #include "clock_settings_filename.h" #include #include #include #include #include #define CLOCK_SETTINGS_VER (1) #define CLOCK_SETTINGS_PATH EXT_PATH(CLOCK_SETTINGS_FILE_NAME) #define CLOCK_SETTINGS_MAGIC (0xC1) #define SAVE_CLOCK_SETTINGS(x) \ saved_struct_save( \ CLOCK_SETTINGS_PATH, (x), sizeof(ClockSettings), CLOCK_SETTINGS_MAGIC, CLOCK_SETTINGS_VER) #define LOAD_CLOCK_SETTINGS(x) \ saved_struct_load( \ CLOCK_SETTINGS_PATH, (x), sizeof(ClockSettings), CLOCK_SETTINGS_MAGIC, CLOCK_SETTINGS_VER) typedef enum { H12 = 1, H24 = 2, } TimeFormat; typedef enum { Iso = 1, // ISO 8601: yyyy-mm-dd Rfc = 2, // RFC 5322: dd-mm-yyyy } DateFormat; typedef struct { TimeFormat time_format; DateFormat date_format; } ClockSettings;