aboutsummaryrefslogtreecommitdiff
path: root/src/timer.h
blob: 8f636dfafc4838292276e5e26e43517c0b9512e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef _TIMER_H
#define _TIMER_H

/* updates 18.2 times per second */
extern volatile uint32_t ticks;

void timer_init();
void timer_free();

void timer_user_fn(void (*fn)(void));

/* countdown clock */
void timer_start(uint8_t secs, volatile uint8_t *updated);
uint8_t timer_value();
void timer_stop();
void timer_resume();

#endif /* _TIMER_H */