cleanup
[linux-2.4.21-pre4.git] / include / asm-cris / fasttimer.h
1 /* $Id: fasttimer.h,v 1.1.1.1 2005/04/11 02:50:52 jack Exp $
2  * linux/include/asm-cris/fasttimer.h
3  *
4  * Fast timers for ETRAX100LX
5  * This may be useful in other OS than Linux so use 2 space indentation...
6  * Copyright (C) 2000, 2002 Axis Communications AB
7  */
8 #include <linux/config.h>
9 #include <linux/time.h> /* struct timeval */
10 #include <linux/timex.h>
11
12 /* The timer0 values gives 52us resolution (1/19200) or higher 
13  * but interrupts at HZ 
14  */
15 /* We use timer1 to generate interrupts at desired times. */
16
17 #ifdef CONFIG_ETRAX_FAST_TIMER
18
19 typedef void fast_timer_function_type(unsigned long);
20
21 struct fast_timer{ /* Close to timer_list */
22   struct fast_timer *next;
23   struct fast_timer *prev;
24   struct timeval tv_set;
25   struct timeval tv_expires;
26   unsigned long delay_us;
27   fast_timer_function_type *function;
28   unsigned long data;
29   const char *name;
30 };
31
32 void start_one_shot_timer(struct fast_timer *t,
33                           fast_timer_function_type *function,
34                           unsigned long data,
35                           unsigned long delay_us,
36                           const char *name);
37
38 int del_fast_timer(struct fast_timer * t);
39 /* return 1 if deleted */
40
41
42 void schedule_usleep(unsigned long us);
43
44
45 void fast_timer_init(void);
46
47 #endif