summaryrefslogtreecommitdiffstats
path: root/movement/watch_faces/clock/world_clock_face.h
diff options
context:
space:
mode:
authorJoey Castillo <joeycastillo@utexas.edu>2022-02-12 22:52:26 -0500
committerJoey Castillo <joeycastillo@utexas.edu>2022-02-13 11:25:28 -0500
commitee95229e19ea56680828bb57e366729e6f95d079 (patch)
tree0dbbaeb9a49cea5523d7020e4b4fa1e11c6f1b2b /movement/watch_faces/clock/world_clock_face.h
parent0bb267c702be08f420efffc7dd66782c7563e130 (diff)
downloadSensor-Watch-ee95229e19ea56680828bb57e366729e6f95d079.tar.gz
Sensor-Watch-ee95229e19ea56680828bb57e366729e6f95d079.tar.bz2
Sensor-Watch-ee95229e19ea56680828bb57e366729e6f95d079.zip
world clock: store settings in backup register if possible
Diffstat (limited to 'movement/watch_faces/clock/world_clock_face.h')
-rw-r--r--movement/watch_faces/clock/world_clock_face.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/movement/watch_faces/clock/world_clock_face.h b/movement/watch_faces/clock/world_clock_face.h
index 36960f53..669dcaa8 100644
--- a/movement/watch_faces/clock/world_clock_face.h
+++ b/movement/watch_faces/clock/world_clock_face.h
@@ -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;