From 6c0b462a2c43d8be50df627a2856d198ef76bf39 Mon Sep 17 00:00:00 2001 From: laforge Date: Sun, 1 Oct 2006 19:23:15 +0000 Subject: - 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 --- firmware/src/os/pit.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'firmware/src/os/pit.h') 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 + +/* 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); -- cgit v1.2.3