xref: /reactos/drivers/parallel/parport/hardware.h (revision 1734f297)
1 /*
2  * COPYRIGHT:       See COPYING in the top level directory
3  * PROJECT:         Parallel Port Function Driver
4  * FILE:            drivers/parallel/parport/hardware.h
5  * PURPOSE:         Hardware definitions
6  */
7 
8 #ifndef _HARDWARE_H_
9 #define _HARDWARE_H_
10 
11 /*
12  * The following constants describe the various signals of the printer port
13  * hardware.  Note that the hardware inverts some signals and that some
14  * signals are active low.  An example is LP_STROBE, which must be programmed
15  * with 1 for being active and 0 for being inactive, because the strobe signal
16  * gets inverted, but it is also active low.
17  */
18 
19 /*
20  * bit defines for 8255 status port
21  * base + 1
22  * accessed with LP_S(minor), which gets the byte...
23  */
24 #define LP_PBUSY    0x80  /* inverted input, active high */
25 #define LP_PACK     0x40  /* unchanged input, active low */
26 #define LP_POUTPA   0x20  /* unchanged input, active high */
27 #define LP_PSELECD  0x10  /* unchanged input, active high */
28 #define LP_PERRORP  0x08  /* unchanged input, active low */
29 
30 /*
31  * defines for 8255 control port
32  * base + 2
33  * accessed with LP_C(minor)
34  */
35 #define LP_PINTEN   0x10
36 #define LP_PSELECP  0x08  /* inverted output, active low */
37 #define LP_PINITP   0x04  /* unchanged output, active low */
38 #define LP_PAUTOLF  0x02  /* inverted output, active low */
39 #define LP_PSTROBE  0x01  /* inverted output, active low */
40 
41 #endif /* _HARDWARE_H_ */
42