diff options
author | laforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-10-01 19:23:15 +0000 |
---|---|---|
committer | laforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2006-10-01 19:23:15 +0000 |
commit | 6c0b462a2c43d8be50df627a2856d198ef76bf39 (patch) | |
tree | 48f33ad9f89443a121f23006bde53ddf62f1e110 /firmware/src/os/pit.h | |
parent | 778802a3a429bcda51cf6d82a897f0e3de6fe644 (diff) |
- finish implementation of timers based on PIT
- add [untested] code for timer-based LED blink codes
git-svn-id: https://svn.openpcd.org:2342/trunk@242 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/src/os/pit.h')
-rw-r--r-- | firmware/src/os/pit.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/firmware/src/os/pit.h b/firmware/src/os/pit.h index 92426e9..e941aeb 100644 --- a/firmware/src/os/pit.h +++ b/firmware/src/os/pit.h @@ -1,6 +1,22 @@ #ifndef _PIT_H #define _PIT_H +#include <sys/types.h> + +/* This API (but not the code) is modelled after the Linux API */ + +struct timer_list { + struct timer_list *next; + unsigned long expires; + void (*function)(void *data); + void *data; +}; + +extern unsigned long jiffies; + +extern void timer_add(struct timer_list *timer); +extern int timer_del(struct timer_list *timer); + extern void pit_init(void); extern void pit_mdelay(u_int32_t ms); |