blob: 098f27018fa6065ce5e94a08bf0560e96c286e70 [file] [log] [blame]
Kevin O'Connorc6e8c072013-07-20 10:51:58 -04001// Definitions for the Intel 8253 Programmable Interrupt Timer (PIT).
2#ifndef __PIT_H
3#define __PIT_H
4
Kevin O'Connorc6e8c072013-07-20 10:51:58 -04005// Bits for PORT_PIT_MODE
6#define PM_SEL_TIMER0 (0<<6)
7#define PM_SEL_TIMER1 (1<<6)
8#define PM_SEL_TIMER2 (2<<6)
9#define PM_SEL_READBACK (3<<6)
10#define PM_ACCESS_LATCH (0<<4)
11#define PM_ACCESS_LOBYTE (1<<4)
12#define PM_ACCESS_HIBYTE (2<<4)
13#define PM_ACCESS_WORD (3<<4)
14#define PM_MODE0 (0<<1)
15#define PM_MODE1 (1<<1)
16#define PM_MODE2 (2<<1)
17#define PM_MODE3 (3<<1)
18#define PM_MODE4 (4<<1)
19#define PM_MODE5 (5<<1)
20#define PM_CNT_BINARY (0<<0)
21#define PM_CNT_BCD (1<<0)
22#define PM_READ_COUNTER0 (1<<1)
23#define PM_READ_COUNTER1 (1<<2)
24#define PM_READ_COUNTER2 (1<<3)
25#define PM_READ_STATUSVALUE (0<<4)
26#define PM_READ_VALUE (1<<4)
27#define PM_READ_STATUS (2<<4)
28
29#endif // pit.h