|
|
1.1 root 1: // gpioctl.h Include file for Generic Port I/O Example Driver
2: //
3: // Define the IOCTL codes we will use. The IOCTL code contains a command
4: // identifier, plus other information about the device, the type of access
5: // with which the file must have been opened, and the type of buffering.
6: //
7: // Robert B. Nelson (Microsoft) March 1, 1993
8:
9: // Device type -- in the "User Defined" range."
10: #define GPD_TYPE 40000
11:
12: // The IOCTL function codes from 0x800 to 0xFFF are for customer use.
13:
14: #define IOCTL_GPD_READ_PORT_UCHAR \
15: CTL_CODE( GPD_TYPE, 0x900, METHOD_BUFFERED, FILE_READ_ACCESS )
16:
17: #define IOCTL_GPD_READ_PORT_USHORT \
18: CTL_CODE( GPD_TYPE, 0x901, METHOD_BUFFERED, FILE_READ_ACCESS )
19:
20: #define IOCTL_GPD_READ_PORT_ULONG \
21: CTL_CODE( GPD_TYPE, 0x902, METHOD_BUFFERED, FILE_READ_ACCESS )
22:
23: #define IOCTL_GPD_WRITE_PORT_UCHAR \
24: CTL_CODE(GPD_TYPE, 0x910, METHOD_BUFFERED, FILE_WRITE_ACCESS)
25:
26: #define IOCTL_GPD_WRITE_PORT_USHORT \
27: CTL_CODE(GPD_TYPE, 0x911, METHOD_BUFFERED, FILE_WRITE_ACCESS)
28:
29: #define IOCTL_GPD_WRITE_PORT_ULONG \
30: CTL_CODE(GPD_TYPE, 0x912, METHOD_BUFFERED, FILE_WRITE_ACCESS)
31:
32: typedef struct _GENPORT_WRITE_INPUT {
33: ULONG PortNumber; // Port # to write to
34: union { // Data to be output to port
35: ULONG LongData;
36: USHORT ShortData;
37: UCHAR CharData;
38: };
39: } GENPORT_WRITE_INPUT;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.