aboutsummaryrefslogtreecommitdiff
path: root/include/ubox_timer.h
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-08-28 15:16:12 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-08-28 15:30:25 +0100
commite35cff6d299a07d9b34f303717083a9299a37e82 (patch)
tree7204099ad4978dfc67e04bc11df29d0f366af851 /include/ubox_timer.h
downloaduboxlib-dos-e35cff6d299a07d9b34f303717083a9299a37e82.tar.gz
uboxlib-dos-e35cff6d299a07d9b34f303717083a9299a37e82.zip
Initial import
Diffstat (limited to 'include/ubox_timer.h')
-rw-r--r--include/ubox_timer.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/ubox_timer.h b/include/ubox_timer.h
new file mode 100644
index 0000000..e2caaaf
--- /dev/null
+++ b/include/ubox_timer.h
@@ -0,0 +1,19 @@
+#ifndef _UBOX_TIMER_H
+#define _UBOX_TIMER_H
+
+/* updates 18.2 times per second */
+extern volatile uint32_t ubox_ticks;
+
+void ubox_timer_init();
+void ubox_timer_free();
+
+/* to be called 18.2 times per second */
+void ubox_timer_user_fn(void (*fn)(void));
+
+/* countdown clock updating by seconds */
+void ubox_timer_start(uint8_t secs, volatile uint8_t *updated);
+uint8_t ubox_timer_value();
+void ubox_timer_stop();
+void ubox_timer_resume();
+
+#endif /* _UBOX_TIMER_H */