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 device* timer_dev;
17 int (*supported)(struct hwtimer*);
18 void (*init)(struct hwtimer*, u32_t hertz, timer_tick_cb);
19 ticks_t (*systicks)();
24 extern struct hwtimer* current_timer;
27 hwtimer_init(u32_t hertz, void* tick_callback);
33 hwtimer_base_frequency();
36 hwtimer_current_systicks();
39 hwtimer_to_ticks(u32_t value, int unit);
41 #endif /* __LUNAIX_HWTIMER_H */