2 colcycle - color cycling image viewer
3 Copyright (C) 2016 John Tsiombikas <nuclear@member.fsf.org>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 /* frequency of the oscillator driving the 8254 timer */
22 #define OSC_FREQ_HZ 1193182
24 /* I/O ports connected to the 8254 */
25 #define PORT_DATA0 0x40
26 #define PORT_DATA1 0x41
27 #define PORT_DATA2 0x42
32 #define CMD_CHAN1 (1 << 6)
33 #define CMD_CHAN2 (2 << 6)
34 #define CMD_RDBACK (3 << 6)
37 #define CMD_ACCESS_LOW (1 << 4)
38 #define CMD_ACCESS_HIGH (2 << 4)
39 #define CMD_ACCESS_BOTH (3 << 4)
41 #define CMD_OP_INT_TERM 0
42 #define CMD_OP_ONESHOT (1 << 1)
43 #define CMD_OP_RATE (2 << 1)
44 #define CMD_OP_SQWAVE (3 << 1)
45 #define CMD_OP_SW_STROBE (4 << 1)
46 #define CMD_OP_HW_STROBE (5 << 1)
48 #define CMD_MODE_BIN 0
49 #define CMD_MODE_BCD 1
51 #endif /* PIT8254_H_ */