1 #ifndef __LUNAIX_HWTIMER_H
2 #define __LUNAIX_HWTIMER_H
4 #include <lunaix/device.h>
5 #include <lunaix/time.h>
6 #include <lunaix/types.h>
8 typedef void (*timer_tick_cb)();
15 struct devclass class;
16 struct device* timer_dev;
18 int (*supported)(struct hwtimer*);
19 void (*init)(struct hwtimer*, u32_t hertz, timer_tick_cb);
20 ticks_t (*systicks)();
25 extern struct hwtimer* current_timer;
28 hwtimer_init(u32_t hertz, void* tick_callback);
34 hwtimer_base_frequency();
37 hwtimer_current_systicks();
40 hwtimer_to_ticks(u32_t value, int unit);
42 #endif /* __LUNAIX_HWTIMER_H */