Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

gpioctl.h

Go to the documentation of this file.
00001 // gpioctl.h    Include file for Generic Port I/O Example Driver
00002 //
00003 // Define the IOCTL codes we will use.  The IOCTL code contains a command
00004 // identifier, plus other information about the device, the type of access
00005 // with which the file must have been opened, and the type of buffering.
00006 //
00007 // Robert B. Nelson (Microsoft)     March 1, 1993
00008 
00009 #ifndef GPIOCTL_H
00010 #define GPIOCTL_H
00011 
00012 // Device type           -- in the "User Defined" range."
00013 #define GPD_TYPE 40000
00014 
00015 // The IOCTL function codes from 0x800 to 0xFFF are for customer use.
00016 
00017 #define IOCTL_GPD_READ_PORT_UCHAR \
00018     CTL_CODE( GPD_TYPE, 0x900, METHOD_BUFFERED, FILE_READ_ACCESS )
00019 
00020 #define IOCTL_GPD_READ_PORT_USHORT \
00021     CTL_CODE( GPD_TYPE, 0x901, METHOD_BUFFERED, FILE_READ_ACCESS )
00022 
00023 #define IOCTL_GPD_READ_PORT_ULONG \
00024     CTL_CODE( GPD_TYPE, 0x902, METHOD_BUFFERED, FILE_READ_ACCESS )
00025 
00026 #define IOCTL_GPD_WRITE_PORT_UCHAR \
00027     CTL_CODE(GPD_TYPE,  0x910, METHOD_BUFFERED, FILE_WRITE_ACCESS)
00028 
00029 #define IOCTL_GPD_WRITE_PORT_USHORT \
00030     CTL_CODE(GPD_TYPE,  0x911, METHOD_BUFFERED, FILE_WRITE_ACCESS)
00031 
00032 #define IOCTL_GPD_WRITE_PORT_ULONG \
00033     CTL_CODE(GPD_TYPE,  0x912, METHOD_BUFFERED, FILE_WRITE_ACCESS)
00034 
00035 typedef struct _GENPORT_WRITE_INPUT
00036 {
00037   ULONG PortNumber;             // Port # to write to
00038   union
00039   {                             // Data to be output to port
00040     ULONG LongData;
00041     USHORT ShortData;
00042     UCHAR CharData;
00043   };
00044 }
00045 GENPORT_WRITE_INPUT;
00046 
00047 #endif

Generated on Sun Dec 2 15:56:49 2001 for rcslib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001