aboutsummaryrefslogtreecommitdiff
path: root/include/ubox_timer.h
blob: e2caaaf5cb78c6d3fe67311eb91289a40c69b2ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 */