Annotation of src/sys/arch/pc532/dev/lptreg.h, Revision 1.4
1.4 ! chs 1: /* $NetBSD: lptreg.h,v 1.3 1995/05/16 07:30:35 phil Exp $ */
1.1 phil 2:
1.3 phil 3: /*
1.1 phil 4: * Copyright (c) 1994 Matthias Pfaller.
5: * All rights reserved.
6: *
7: * Redistribution and use in source and binary forms, with or without
8: * modification, are permitted provided that the following conditions
9: * are met:
10: * 1. Redistributions of source code must retain the above copyright
11: * notice, this list of conditions and the following disclaimer.
12: * 2. Redistributions in binary form must reproduce the above copyright
13: * notice, this list of conditions and the following disclaimer in the
14: * documentation and/or other materials provided with the distribution.
15: * 3. All advertising materials mentioning features or use of this software
16: * must display the following acknowledgement:
17: * This product includes software developed by Matthias Pfaller.
1.3 phil 18: * 4. The name of the author may not be used to endorse or promote products
19: * derived from this software without specific prior written permission
1.1 phil 20: *
1.3 phil 21: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1.1 phil 22: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1.3 phil 24: * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1.1 phil 25: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26: * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27: * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28: * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30: * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31: *
32: * lptreg.h: definitions for the lpt driver.
33: *
34: */
35:
36: struct i8255 {
37: unsigned char port_a; /* Port A data (r/w) */
38: unsigned char port_b; /* Port B data (r/w) */
39: unsigned char port_c; /* Port C data (r/w) */
40: unsigned char port_control; /* Port control (-/w) */
41: };
42:
43: /* port_a */
44: #define LPA_ALF 0x01
45: #define LPA_SELECT 0x02
1.3 phil 46: #define LPA_NPRIME 0x04
1.1 phil 47: #define LPA_ACKENABLE 0x08 /* Enable Ack interrupts */
48: #define LPA_ACTIVE 0x10 /* Device active led */
49:
50: /* port_c */
51: #define LPC_IRQ 0x01
52: #define LPC_NSTROBE 0x02
53: #define LPC_NBUSY 0x08 /* Negative logic! */
54: #define LPC_NERROR 0x10
1.3 phil 55: #define LPC_ONLINE 0x20
1.1 phil 56: #define LPC_NOPAPER 0x40
1.3 phil 57: #define LPC_NACK 0x80
1.1 phil 58:
59: /* port_control */
60: #define LPT_PROBE_MODE 0x8c
61: #define LPT_MODE 0x8d /* Port A: Output, Mode 0 */
62: /* Port B: Output, Mode 1 */
63: /* Port C: Input */
64: #define LPT_IRQENABLE 0x05 /* Enable LPT interrupts */
65: #define LPT_IRQDISABLE 0x04 /* Disable LPT interrupts */
66:
67: #define LPT_PROBE_MASK 0x08
68: #define LPT_PROBE_SET 0x07
69: #define LPT_PROBE_CLR 0x06
CVSweb <webmaster@jp.NetBSD.org>