File: lpt-port.h

package info (click to toggle)
lcdproc 0.5.9-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,064 kB
  • sloc: ansic: 59,645; sh: 1,740; perl: 681; makefile: 417
file content (65 lines) | stat: -rw-r--r-- 1,939 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
 * This file contains defines to control the LPT port.
 * A lot of this was originally in hd44780-low.h
 *
 * Moved from the HD44780 driver by Joris Robijn.
 *
 * This file is released under the GNU General Public License. Refer to the
 * COPYING file distributed with this package.
 *
 * Copyright (c)  2000, 1999, 1995 Benjamin Tse <blt@Comports.com>
 *		  2001 Joris Robijn <joris@robijn.net>
 *		  2001 Mark Haemmerling <mail@markh.de>
 *		  2000 Charles Steinkuehler <cstein@newtek.com>
 *		  1999 Andrew McMeikan <andrewm@engineer.com>
 *		  1998 Richard Rognlie <rrognlie@gamerz.net>
 *		  1997 Matthias Prinke <m.prinke@trashcan.mcnet.de>
 */

#ifndef LPT_PORT_H
#define LPT_PORT_H


/* Output data
 * Write to baseaddress+0
 */
/* Straight-forward use, no defines needed for this... */


/* Control output lines
 * Write to baseaddress+2
 */
#define nSTRB 	0x01	/* pin 1; negative logic */
#define STRB 	0x01
#define nLF 	0x02	/* pin 14 */
#define LF 	0x02
#define INIT 	0x04	/* pin 16; the only positive logic output line */
#define nSEL 	0x08	/* pin 17 */
#define SEL 	0x08
#define ENIRQ	0x10	/* Enable IRQ via ACK line (don't enable this without
			 * setting up interrupt stuff too) */
#define ENBI	0x20	/* Enable bi-directional port (is nice to play with!
			 * I first didn't know a SPP could do this) */

#define OUTMASK	0x0B	/* SEL, LF and STRB are hardware inverted */
			/* Use this mask only for the control output lines */
			/* XOR with this mask ( ^ OUTMASK ) */


/* Control input lines
 * Read from baseaddress+1
 */
#define nFAULT	0x08	/* pin 15 */
#define FAULT	0x08
#define SELIN	0x10	/* pin 13 */
#define PAPEREND  0x20	/* pin 12 */
#define nACK	0x40	/* pin 10 */
#define ACK	0x40
#define BUSY	0x80	/* pin 11 */
#define IRQ	0x02

#define INMASK	0x84	/* BUSY input and the IRQ indicator are inverted */
			/* Use this mask only for the control input lines */
			/* XOR with this mask ( ^ INMASK ) */

#endif