aboutsummaryrefslogtreecommitdiff
path: root/src/mode.h
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2026-02-28 17:37:19 +0530
committerAkshay Nair <phenax5@gmail.com>2026-02-28 17:37:19 +0530
commit18268280dc6c0bd44035b53655ae43e9c88245bd (patch)
treec17b1703d8a3deb4cd67a6e6466d024f02a49bb7 /src/mode.h
parent02c12bfedcf669df81491ea49502a982e980bcda (diff)
downloaddaft-watch-18268280dc6c0bd44035b53655ae43e9c88245bd.tar.gz
daft-watch-18268280dc6c0bd44035b53655ae43e9c88245bd.zip
Add set time mode + test for button
Diffstat (limited to '')
-rw-r--r--src/mode.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mode.h b/src/mode.h
new file mode 100644
index 0000000..db65fc8
--- /dev/null
+++ b/src/mode.h
@@ -0,0 +1,22 @@
+#ifndef _LOADED_MODE
+#define _LOADED_MODE
+#include <stdint.h>
+enum Mode {
+ ModeDisplayTime,
+ ModeSetTime,
+};
+
+enum ButtonState {
+ ButtonIdle = 0,
+ ButtonActive = 1,
+ ButtonPressed = 2,
+ ButtonLongPressed = 3,
+};
+
+extern enum Mode current_mode;
+extern volatile uint8_t new_minutes;
+extern volatile uint8_t new_hours;
+
+void apply_button_state(enum ButtonState button_state);
+
+#endif