From e35cff6d299a07d9b34f303717083a9299a37e82 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Mon, 28 Aug 2023 15:16:12 +0100 Subject: Initial import --- include/ubox_timer.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 include/ubox_timer.h (limited to 'include/ubox_timer.h') 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 */ -- cgit v1.2.3