world clock: store settings in backup register if possible

This commit is contained in:
Joey Castillo
2022-02-12 22:52:26 -05:00
parent 0bb267c702
commit ee95229e19
2 changed files with 34 additions and 26 deletions

View File

@@ -26,15 +26,18 @@
#define WORLD_CLOCK_FACE_H_
#include "movement.h"
typedef struct {
uint8_t char_0;
uint8_t char_1;
uint8_t timezone_index;
typedef union {
struct {
uint8_t char_0;
uint8_t char_1;
uint8_t timezone_index;
} bit;
uint32_t reg;
} world_clock_settings_t;
typedef struct {
world_clock_settings_t settings;
uint8_t backup_register;
uint8_t current_screen;
uint32_t previous_date_time;
} world_clock_state_t;