mesa: simplify dependencies in mmakefiles
[AROS.git] / compiler / include / hardware / pit.h
blob712cf626c4d45d118b76bd5f761346f7b1d7c2d3
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: IBM PC-compatible PIT (8253) specific definitions
6 Lang: english
7 */
9 #ifndef HARDWARE_PIT_H
10 #define HARDWARE_PIT_H
12 #include <asm/io.h>
14 #define PIT_CH0 0x40
15 #define PIT_CH1 0x41 /* This channel is likely missing */
16 #define PIT_CH2 0x42
17 #define PIT_CONTROL 0x43
19 #define BCD 0x01 /* BCD flag */
20 #define MODE_TERMINAL 0x00 /* Channel mode */
21 #define MODE_ONESHOT 0x02
22 #define MODE_RATE 0x04
23 #define MODE_SQUARE 0x06
24 #define MODE_SW_STROBE 0x08
25 #define MODE_HW_STROBE 0x0A
26 #define ACCESS_LATCH 0x00 /* 'Latch value' command */
27 #define ACCESS_LOW 0x10 /* Access mode */
28 #define ACCESS_HI 0x20
29 #define ACCESS_FULL 0x30
30 #define CH0 0x00 /* Channel selector */
31 #define CH1 0x40
32 #define CH2 0x80
33 #define READBACK 0xC0
35 /* Two useful macros for accessing counter values */
36 #define ch_read(port) inb(port) | (inb(port) << 8)
37 #define ch_write(val, port) outb((val) & 0xff, port); outb(((val) >> 8) & 0xff, port)
39 #endif