rayzor

view src/pit8254.h @ 17:79609d482762

the renderer renders, also fixed an unnoticed matrix conversion problem between scenegraph and min3d
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 14 Apr 2014 07:34:45 +0300
parents 2a5340a6eee4
children
line source
1 #ifndef PIT8254_H_
2 #define PIT8254_H_
4 /* frequency of the oscillator driving the 8254 timer */
5 #define OSC_FREQ_HZ 1193182
7 /* I/O ports connected to the 8254 */
8 #define PORT_DATA0 0x40
9 #define PORT_DATA1 0x41
10 #define PORT_DATA2 0x42
11 #define PORT_CMD 0x43
13 /* command bits */
14 #define CMD_CHAN0 0
15 #define CMD_CHAN1 (1 << 6)
16 #define CMD_CHAN2 (2 << 6)
17 #define CMD_RDBACK (3 << 6)
19 #define CMD_LATCH 0
20 #define CMD_ACCESS_LOW (1 << 4)
21 #define CMD_ACCESS_HIGH (2 << 4)
22 #define CMD_ACCESS_BOTH (3 << 4)
24 #define CMD_OP_INT_TERM 0
25 #define CMD_OP_ONESHOT (1 << 1)
26 #define CMD_OP_RATE (2 << 1)
27 #define CMD_OP_SQWAVE (3 << 1)
28 #define CMD_OP_SW_STROBE (4 << 1)
29 #define CMD_OP_HW_STROBE (5 << 1)
31 #define CMD_MODE_BIN 0
32 #define CMD_MODE_BCD 1
34 #endif /* PIT8254_H_ */