OSDN Git Service

Insert removed author attribution.
[mingw/mingw-org-wsl.git] / include / ddk / ntddpar.h
1 /**
2  * @file ntddpar.h
3  * @copy 2012 MinGW.org project
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 /* Created by Casper S. Hornstrup <chorns@users.sourceforge.net> */
25 #ifndef __NTDDPAR_H
26 #define __NTDDPAR_H
27 #pragma GCC system_header
28 #include <_mingw.h>
29
30 /*
31  * Parallel port driver interface
32  */
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #include "ntddk.h"
39
40 /* Parallel port device GUIDs */
41
42 DEFINE_GUID (GUID_DEVINTERFACE_PARALLEL,
43   0x97F76EF0, 0xF883, 0x11D0, 0xAF, 0x1F, 0x00, 0x00, 0xF8, 0x00, 0x84, 0x5C);
44 DEFINE_GUID (GUID_DEVINTERFACE_PARCLASS,
45   0x811FC6A5, 0xF728, 0x11D0, 0xA5, 0x37, 0x00, 0x00, 0xF8, 0x75, 0x3E, 0xD1);
46
47 #define GUID_PARALLEL_DEVICE GUID_DEVINTERFACE_PARALLEL
48 #define GUID_PARCLASS_DEVICE GUID_DEVINTERFACE_PARCLASS
49
50
51 #define IOCTL_IEEE1284_GET_MODE \
52   CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
53 #define IOCTL_IEEE1284_NEGOTIATE \
54   CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
55 #define IOCTL_PAR_GET_DEFAULT_MODES \
56   CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
57 #define IOCTL_PAR_GET_DEVICE_CAPS \
58   CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
59 #define IOCTL_PAR_IS_PORT_FREE \
60   CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 21, METHOD_BUFFERED, FILE_ANY_ACCESS)
61 #define IOCTL_PAR_QUERY_DEVICE_ID \
62   CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
63 #define IOCTL_PAR_QUERY_DEVICE_ID_SIZE \
64   CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
65 #define IOCTL_PAR_QUERY_INFORMATION \
66   CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
67 #define IOCTL_PAR_QUERY_LOCATION \
68   CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 22, METHOD_BUFFERED, FILE_ANY_ACCESS)
69 #define IOCTL_PAR_QUERY_RAW_DEVICE_ID \
70   CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
71 #define IOCTL_PAR_SET_INFORMATION \
72   CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
73 #define IOCTL_PAR_SET_READ_ADDRESS \
74   CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
75 #define IOCTL_PAR_SET_WRITE_ADDRESS \
76   CTL_CODE (FILE_DEVICE_PARALLEL_PORT, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
77
78 typedef struct _PAR_DEVICE_ID_SIZE_INFORMATION {
79   ULONG  DeviceIdSize;
80 } PAR_DEVICE_ID_SIZE_INFORMATION, *PPAR_DEVICE_ID_SIZE_INFORMATION;
81
82 #define PARALLEL_INIT                     0x01
83 #define PARALLEL_AUTOFEED                 0x02
84 #define PARALLEL_PAPER_EMPTY              0x04
85 #define PARALLEL_OFF_LINE                 0x08
86 #define PARALLEL_POWER_OFF                0x10
87 #define PARALLEL_NOT_CONNECTED            0x20
88 #define PARALLEL_BUSY                     0x40
89 #define PARALLEL_SELECTED                 0x80
90
91 typedef struct _PAR_QUERY_INFORMATION {
92   UCHAR  Status;
93 } PAR_QUERY_INFORMATION, *PPAR_QUERY_INFORMATION;
94
95 typedef struct _PAR_SET_INFORMATION {
96   UCHAR  Init;
97 } PAR_SET_INFORMATION, *PPAR_SET_INFORMATION;
98
99 typedef struct _PARCLASS_NEGOTIATION_MASK {
100   USHORT  usReadMask;
101   USHORT  usWriteMask;
102 } PARCLASS_NEGOTIATION_MASK, *PPARCLASS_NEGOTIATION_MASK;
103
104 #define NONE                              0x0000
105 #define CENTRONICS                        0x0001
106 #define IEEE_COMPATIBILITY                0x0002
107 #define NIBBLE                            0x0004
108 #define CHANNEL_NIBBLE                    0x0008
109 #define BYTE_BIDIR                        0x0010
110 #define EPP_HW                            0x0020
111 #define EPP_SW                            0x0040
112 #define EPP_ANY                           0x0060
113 #define BOUNDED_ECP                       0x0080
114 #define ECP_HW_NOIRQ                      0x0100
115 #define ECP_HW_IRQ                        0x0200
116 #define ECP_SW                            0x0400
117 #define ECP_ANY                           0x0780
118
119 #ifdef __cplusplus
120 }
121 #endif
122
123 #endif /* __NTDDPAR_H */