From ee95229e19ea56680828bb57e366729e6f95d079 Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Sat, 12 Feb 2022 22:52:26 -0500 Subject: world clock: store settings in backup register if possible --- movement/watch_faces/clock/world_clock_face.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'movement/watch_faces/clock/world_clock_face.h') 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; -- cgit v1.2.3