1 #ifndef __LUNAIX_HWTIMER_H
2 #define __LUNAIX_HWTIMER_H
4 #include <lunaix/time.h>
5 #include <lunaix/types.h>
7 typedef void (*timer_tick_cb)();
14 int (*supported)(struct hwtimer_context*);
15 void (*init)(struct hwtimer_context*, u32_t hertz, timer_tick_cb);
16 ticks_t (*systicks)();
21 extern struct hwtimer_context* current_timer;
24 hwtimer_init(u32_t hertz, void* tick_callback);
26 struct hwtimer_context*
30 hwtimer_base_frequency();
33 hwtimer_current_systicks();
36 hwtimer_to_ticks(u32_t value, int unit);
38 #endif /* __LUNAIX_HWTIMER_H */