Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / include / ddk / ntddpcm.h
blobfc650750c4c67e122c28925fd65aa0139352a01b
1 /*
2 * ntddpcm.h
4 * PCMCIA IOCTL interface
6 * This file is part of the w32api package.
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 #ifndef __NTDDPCM_H
24 #define __NTDDPCM_H
26 #if __GNUC__ >=3
27 #pragma GCC system_header
28 #endif
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 #include "ntddk.h"
36 #define IOCTL_PCMCIA_BASE FILE_DEVICE_CONTROLLER
38 #define DD_PCMCIA_DEVICE_NAME "\\\\.\\Pcmcia"
39 #define DD_PCMCIA_DEVICE_NAME_U L"\\\\.\\Pcmcia"
41 #define IOCTL_GET_TUPLE_DATA \
42 CTL_CODE(IOCTL_PCMCIA_BASE, 3000, METHOD_BUFFERED, FILE_ANY_ACCESS)
44 #define IOCTL_SOCKET_INFORMATION \
45 CTL_CODE(IOCTL_PCMCIA_BASE, 3004, METHOD_BUFFERED, FILE_ANY_ACCESS)
47 #define DEVICE_IDENTIFIER_LENGTH 64
48 #define DRIVER_NAME_LENGTH 32
49 #define MANUFACTURER_NAME_LENGTH 64
51 #define PcmciaInvalidControllerType 0xffffffff
53 typedef struct _TUPLE_REQUEST {
54 USHORT Socket;
55 } TUPLE_REQUEST, *PTUPLE_REQUEST;
57 typedef enum _PCMCIA_CONTROLLER_CLASS {
58 PcmciaInvalidControllerClass = -1,
59 PcmciaIntelCompatible,
60 PcmciaCardBusCompatible,
61 PcmciaElcController,
62 PcmciaDatabook,
63 PcmciaPciPcmciaBridge,
64 PcmciaCirrusLogic,
65 PcmciaTI,
66 PcmciaTopic,
67 PcmciaRicoh,
68 PcmciaDatabookCB,
69 PcmciaOpti,
70 PcmciaTrid,
71 PcmciaO2Micro,
72 PcmciaNEC,
73 PcmciaNEC_98
74 } PCMCIA_CONTROLLER_CLASS, *PPCMCIA_CONTROLLER_CLASS;
76 typedef struct _PCMCIA_SOCKET_INFORMATION {
77 USHORT Socket;
78 USHORT TupleCrc;
79 UCHAR Manufacturer[MANUFACTURER_NAME_LENGTH];
80 UCHAR Identifier[DEVICE_IDENTIFIER_LENGTH];
81 UCHAR DriverName[DRIVER_NAME_LENGTH];
82 UCHAR DeviceFunctionId;
83 UCHAR Reserved;
84 UCHAR CardInSocket;
85 UCHAR CardEnabled;
86 ULONG ControllerType;
87 } PCMCIA_SOCKET_INFORMATION, *PPCMCIA_SOCKET_INFORMATION;
89 #define PcmciaClassFromControllerType(type) ((PCMCIA_CONTROLLER_CLASS)((type) & 0xff))
90 #define PcmciaModelFromControllerType(type) (((type) >> 8) & 0x3ffff)
91 #define PcmciaRevisionFromControllerType(type) ((type) >> 26)
94 DEFINE_GUID(GUID_PCMCIA_INTERFACE_STANDARD, \
95 0xbed5dadfL, 0x38fb, 0x11d1, 0x94, 0x62, 0x00, 0xc0, 0x4f, 0xb9, 0x60, 0xee);
97 typedef ULONG MEMORY_SPACE;
99 typedef ULONG STDCALL
100 (*PPCMCIA_READ_WRITE_CONFIG)(
101 /*IN*/ PVOID Context,
102 /*IN*/ ULONG WhichSpace,
103 /*IN*/ PUCHAR Buffer,
104 /*IN*/ ULONG Offset,
105 /*IN*/ ULONG Length);
107 #define PCCARD_PCI_CONFIGURATION_SPACE 0
108 #define PCCARD_ATTRIBUTE_MEMORY 1
109 #define PCCARD_COMMON_MEMORY 2
110 #define PCCARD_ATTRIBUTE_MEMORY_INDIRECT 3
111 #define PCCARD_COMMON_MEMORY_INDIRECT 4
113 typedef struct _PCMCIA_BUS_INTERFACE_STANDARD {
114 USHORT Size;
115 USHORT Version;
116 PVOID Context;
117 PINTERFACE_REFERENCE InterfaceReference;
118 PINTERFACE_DEREFERENCE InterfaceDereference;
119 PPCMCIA_READ_WRITE_CONFIG ReadConfig;
120 PPCMCIA_READ_WRITE_CONFIG WriteConfig;
121 } PCMCIA_BUS_INTERFACE_STANDARD, *PPCMCIA_BUS_INTERFACE_STANDARD;
123 #define PCMCIA_MEMORY_8BIT_ACCESS 0
124 #define PCMCIA_MEMORY_16BIT_ACCESS 1
126 typedef BOOLEAN STDCALL
127 (*PPCMCIA_MODIFY_MEMORY_WINDOW)(
128 /*IN*/ PVOID Context,
129 /*IN*/ ULONGLONG HostBase,
130 /*IN*/ ULONGLONG CardBase,
131 /*IN*/ BOOLEAN Enable,
132 /*IN*/ ULONG WindowSize /*OPTIONAL*/,
133 /*IN*/ UCHAR AccessSpeed /*OPTIONAL*/,
134 /*IN*/ UCHAR BusWidth /*OPTIONAL*/,
135 /*IN*/ BOOLEAN IsAttributeMemory /*OPTIONAL*/);
137 #define PCMCIA_VPP_0V 0
138 #define PCMCIA_VPP_12V 1
139 #define PCMCIA_VPP_IS_VCC 2
141 typedef BOOLEAN STDCALL
142 (*PPCMCIA_SET_VPP)(
143 /*IN*/ PVOID Context,
144 /*IN*/ UCHAR VppLevel);
146 typedef BOOLEAN STDCALL
147 (*PPCMCIA_IS_WRITE_PROTECTED)(
148 /*IN*/ PVOID Context);
150 typedef struct _PCMCIA_INTERFACE_STANDARD {
151 USHORT Size;
152 USHORT Version;
153 PINTERFACE_REFERENCE InterfaceReference;
154 PINTERFACE_DEREFERENCE InterfaceDereference;
155 PVOID Context;
156 PPCMCIA_MODIFY_MEMORY_WINDOW ModifyMemoryWindow;
157 PPCMCIA_SET_VPP SetVpp;
158 PPCMCIA_IS_WRITE_PROTECTED IsWriteProtected;
159 } PCMCIA_INTERFACE_STANDARD, *PPCMCIA_INTERFACE_STANDARD;
161 #ifdef __cplusplus
163 #endif
165 #endif /* __NTDDPCM_H */