summaryrefslogtreecommitdiffstats
path: root/movement/watch_faces/clock/world_clock_face.h
diff options
context:
space:
mode:
authorJoey Castillo <jose.castillo@gmail.com>2021-11-26 13:43:47 -0500
committerJoey Castillo <jose.castillo@gmail.com>2021-11-26 13:43:47 -0500
commit002d368a25914527015f63967421fd0e7c5bda17 (patch)
tree81f95271cb047988bc00221291b654232a5f2278 /movement/watch_faces/clock/world_clock_face.h
parent4a4ab81c6c11bc159796992590646d9ef8de5f1b (diff)
downloadSensor-Watch-002d368a25914527015f63967421fd0e7c5bda17.tar.gz
Sensor-Watch-002d368a25914527015f63967421fd0e7c5bda17.tar.bz2
Sensor-Watch-002d368a25914527015f63967421fd0e7c5bda17.zip
movement: add world clock face
Diffstat (limited to 'movement/watch_faces/clock/world_clock_face.h')
-rw-r--r--movement/watch_faces/clock/world_clock_face.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/movement/watch_faces/clock/world_clock_face.h b/movement/watch_faces/clock/world_clock_face.h
new file mode 100644
index 00000000..1c4525a4
--- /dev/null
+++ b/movement/watch_faces/clock/world_clock_face.h
@@ -0,0 +1,33 @@
+#ifndef WORLD_CLOCK_FACE_H_
+#define WORLD_CLOCK_FACE_H_
+
+#include "movement.h"
+
+typedef struct {
+ uint8_t char_0;
+ uint8_t char_1;
+ uint8_t timezone_index;
+} world_clock_settings_t;
+
+typedef struct {
+ world_clock_settings_t settings;
+ uint8_t current_screen;
+ uint32_t previous_date_time;
+} world_clock_state_t;
+
+void world_clock_face_setup(movement_settings_t *settings, void ** context_ptr);
+void world_clock_face_activate(movement_settings_t *settings, void *context);
+bool world_clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
+void world_clock_face_resign(movement_settings_t *settings, void *context);
+
+uint8_t world_clock_face_get_weekday(uint16_t day, uint16_t month, uint16_t year);
+
+static const watch_face_t world_clock_face = {
+ world_clock_face_setup,
+ world_clock_face_activate,
+ world_clock_face_loop,
+ world_clock_face_resign,
+ NULL
+};
+
+#endif // WORLD_CLOCK_FACE_H_