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)();
26 hwtimer_init(u32_t hertz, void* tick_callback);
29 select_platform_timer();
32 hwtimer_base_frequency();
35 hwtimer_current_systicks();
38 hwtimer_to_ticks(u32_t value, int unit);
40 #endif /* __LUNAIX_HWTIMER_H */