summaryrefslogtreecommitdiff
path: root/firmware/src/os/pit.h
diff options
context:
space:
mode:
authorlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-10-01 19:23:15 +0000
committerlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-10-01 19:23:15 +0000
commit6c0b462a2c43d8be50df627a2856d198ef76bf39 (patch)
tree48f33ad9f89443a121f23006bde53ddf62f1e110 /firmware/src/os/pit.h
parent778802a3a429bcda51cf6d82a897f0e3de6fe644 (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.h16
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);
personal git repositories of Harald Welte. Your mileage may vary