2 * GeekOS timer interrupt support
3 * Copyright (c) 2001, David H. Hovemeyer <daveho@cs.umd.edu>
4 * Copyright (c) 2008, Jack Lange <jarusl@cs.northwestern.edu>
5 * (c) 2008, The V3VEE Project <http://www.v3vee.org>
8 * This is free software. You are permitted to use,
9 * redistribute, and modify it as specified in the file "COPYING".
12 #ifndef GEEKOS_TIMER_H
13 #define GEEKOS_TIMER_H
17 extern volatile ulong_t g_numTicks;
19 typedef void (*timerCallback)(int);
21 void Init_Timer(void);
23 void Micro_Delay(int us);
27 int ticks; /* timer code decrements this */
28 int id; /* unqiue id for this timer even */
29 timerCallback callBack; /* Queue to wakeup on timer expire */
33 int Start_Timer(int ticks, timerCallback);
34 int Get_Remaing_Timer_Ticks(int id);
35 int Cancel_Timer(int id);
38 void Micro_Delay(int us);
40 #endif /* GEEKOS_TIMER_H */