diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-08-28 15:16:12 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-08-28 15:30:25 +0100 |
commit | e35cff6d299a07d9b34f303717083a9299a37e82 (patch) | |
tree | 7204099ad4978dfc67e04bc11df29d0f366af851 /include/ubox_timer.h | |
download | uboxlib-dos-e35cff6d299a07d9b34f303717083a9299a37e82.tar.gz uboxlib-dos-e35cff6d299a07d9b34f303717083a9299a37e82.zip |
Initial import
Diffstat (limited to 'include/ubox_timer.h')
-rw-r--r-- | include/ubox_timer.h | 19 |
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 */ |