1 /* $Id: fasttimer.h,v 1.1.1.1 2005/04/11 02:50:52 jack Exp $
2 * linux/include/asm-cris/fasttimer.h
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
8 #include <linux/config.h>
9 #include <linux/time.h> /* struct timeval */
10 #include <linux/timex.h>
12 /* The timer0 values gives 52us resolution (1/19200) or higher
13 * but interrupts at HZ
15 /* We use timer1 to generate interrupts at desired times. */
17 #ifdef CONFIG_ETRAX_FAST_TIMER
19 typedef void fast_timer_function_type(unsigned long);
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;
32 void start_one_shot_timer(struct fast_timer *t,
33 fast_timer_function_type *function,
35 unsigned long delay_us,
38 int del_fast_timer(struct fast_timer * t);
39 /* return 1 if deleted */
42 void schedule_usleep(unsigned long us);
45 void fast_timer_init(void);