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