summaryrefslogtreecommitdiff
path: root/firmware/src/os/pit.h
blob: 4ac717ece8d00295f307d13c7b9e5c9e0f124612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef _PIT_H
#define _PIT_H

#include <sys/types.h>

#define HZ	100

/* 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 volatile 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(uint32_t ms);

#endif
personal git repositories of Harald Welte. Your mileage may vary