1/*	$NetBSD: i8253.h,v 1.5 2020/05/25 20:47:20 christos Exp $	*/
2
3/* Copyright (c) 1995 Vixie Enterprises
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies, and that
8 * the name of Vixie Enterprises not be used in advertising or publicity
9 * pertaining to distribution of the document or software without specific,
10 * written prior permission.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND VIXIE ENTERPRISES DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
14 * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL VIXIE ENTERPRISES
15 * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
16 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
17 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
18 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
19 * SOFTWARE.
20 */
21
22#ifndef _I8253_DEFINED
23#define _I8253_DEFINED
24
25typedef union {
26	unsigned char	i;
27	struct {
28		unsigned int	bcd	: 1;
29#define				i8253_binary	0
30#define				i8253_bcd	1
31		unsigned int	mode	: 3;
32#define				i8253_termcnt	0
33#define				i8253_oneshot	1
34#define				i8253_rategen	2
35#define				i8253_sqrwave	3
36#define				i8253_softstb	4
37#define				i8253_hardstb	5
38		unsigned int	rl	: 2;
39#define				i8253_latch	0
40#define				i8253_lsb	1
41#define				i8253_msb	2
42#define				i8253_lmb	3
43		unsigned int	cntr	: 2;
44#define				i8253_cntr_0	0
45#define				i8253_cntr_1	1
46#define				i8253_cntr_2	2
47	} s;
48} i8253_ctrl;
49
50#endif /*_I8253_DEFINED*/
51