ReactOS  r73918
ntddpcm.h
Go to the documentation of this file.
1 /*
2  * ntddpcm.h
3  *
4  * PCMCIA IOCTL interface
5  *
6  * This file is part of the w32api package.
7  *
8  * Contributors:
9  * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10  *
11  * THIS SOFTWARE IS NOT COPYRIGHTED
12  *
13  * This source code is offered for use in the public domain. You may
14  * use, modify or distribute it freely.
15  *
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.
20  *
21  */
22 
23 #pragma once
24 
25 #ifndef _NTDDPCMH_
26 #define _NTDDPCMH_
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #define IOCTL_PCMCIA_BASE FILE_DEVICE_CONTROLLER
33 
34 #define DD_PCMCIA_DEVICE_NAME "\\\\.\\Pcmcia"
35 #define DD_PCMCIA_DEVICE_NAME_U L"\\\\.\\Pcmcia"
36 
37 #define IOCTL_GET_TUPLE_DATA \
38  CTL_CODE(IOCTL_PCMCIA_BASE, 3000, METHOD_BUFFERED, FILE_ANY_ACCESS)
39 
40 #define IOCTL_SOCKET_INFORMATION \
41  CTL_CODE(IOCTL_PCMCIA_BASE, 3004, METHOD_BUFFERED, FILE_ANY_ACCESS)
42 
43 #define DEVICE_IDENTIFIER_LENGTH 64
44 #define DRIVER_NAME_LENGTH 32
45 #define MANUFACTURER_NAME_LENGTH 64
46 
47 #define PcmciaInvalidControllerType 0xffffffff
48 
49 typedef struct _TUPLE_REQUEST {
52 
71 
84 
85 #define PcmciaClassFromControllerType(type) ((PCMCIA_CONTROLLER_CLASS)((type) & 0xff))
86 #define PcmciaModelFromControllerType(type) (((type) >> 8) & 0x3ffff)
87 #define PcmciaRevisionFromControllerType(type) ((type) >> 26)
88 
89 DEFINE_GUID(GUID_PCMCIA_INTERFACE_STANDARD, \
90  0xbed5dadfL, 0x38fb, 0x11d1, 0x94, 0x62, 0x00, 0xc0, 0x4f, 0xb9, 0x60, 0xee);
91 
93 
94 typedef
95 _Function_class_(PCMCIA_READ_CONFIG)
96 ULONG
97 (NTAPI PCMCIA_READ_CONFIG)(
102  _In_ ULONG Length);
103 typedef PCMCIA_READ_CONFIG *PPCMCIA_READ_CONFIG;
104 
105 typedef
106 _Function_class_(PCMCIA_WRITE_CONFIG)
107 ULONG
108 (NTAPI PCMCIA_WRITE_CONFIG)(
109  _In_opt_ PVOID Context,
110  _In_ ULONG WhichSpace,
111  _In_reads_bytes_(Length) PUCHAR Buffer,
112  _In_ ULONG Offset,
113  _In_ ULONG Length);
114 typedef PCMCIA_WRITE_CONFIG *PPCMCIA_WRITE_CONFIG;
115 
116 #define PCCARD_PCI_CONFIGURATION_SPACE 0
117 #define PCCARD_ATTRIBUTE_MEMORY 1
118 #define PCCARD_COMMON_MEMORY 2
119 #define PCCARD_ATTRIBUTE_MEMORY_INDIRECT 3
120 #define PCCARD_COMMON_MEMORY_INDIRECT 4
121 
128  PPCMCIA_READ_WRITE_CONFIG ReadConfig;
129  PPCMCIA_READ_WRITE_CONFIG WriteConfig;
131 
132 #define PCMCIA_MEMORY_8BIT_ACCESS 0
133 #define PCMCIA_MEMORY_16BIT_ACCESS 1
134 
135 typedef
136 _Function_class_(PCMCIA_MODIFY_MEMORY_WINDOW)
137 BOOLEAN
138 (NTAPI PCMCIA_MODIFY_MEMORY_WINDOW)(
139  _In_opt_ PVOID Context,
147 typedef PCMCIA_MODIFY_MEMORY_WINDOW *PPCMCIA_MODIFY_MEMORY_WINDOW;
148 
149 #define PCMCIA_VPP_0V 0
150 #define PCMCIA_VPP_12V 1
151 #define PCMCIA_VPP_IS_VCC 2
152 
153 typedef
154 _Function_class_(PCMCIA_SET_VPP)
155 BOOLEAN
156 (NTAPI PCMCIA_SET_VPP)(
157  _In_opt_ PVOID Context,
159 typedef PCMCIA_SET_VPP *PPCMCIA_SET_VPP;
160 
161 typedef
162 _Function_class_(PCMCIA_IS_WRITE_PROTECTED)
163 BOOLEAN
164 (NTAPI PCMCIA_IS_WRITE_PROTECTED)(
165  _In_opt_ PVOID Context);
166 typedef PCMCIA_IS_WRITE_PROTECTED *PPCMCIA_IS_WRITE_PROTECTED;
167 
174  PPCMCIA_MODIFY_MEMORY_WINDOW ModifyMemoryWindow;
175  PPCMCIA_SET_VPP SetVpp;
176  PPCMCIA_IS_WRITE_PROTECTED IsWriteProtected;
178 
179 #ifdef __cplusplus
180 }
181 #endif
182 
183 #endif /* _NTDDPCMH_ */
DWORD *typedef PVOID
Definition: winlogon.h:52
PCMCIA_READ_CONFIG * PPCMCIA_READ_CONFIG
Definition: ntddpcm.h:103
enum _PCMCIA_CONTROLLER_CLASS * PPCMCIA_CONTROLLER_CLASS
PPCMCIA_READ_WRITE_CONFIG WriteConfig
Definition: ntddpcm.h:129
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: ntddpcm.h:127
_In_ ULONG _Out_writes_bytes_all_(Length) PUCHAR Buffer
Definition: ntddpcm.h:100
BOOLEAN Enable
Definition: acefiex.h:245
PCMCIA_SET_VPP * PPCMCIA_SET_VPP
Definition: ntddpcm.h:159
PPCMCIA_MODIFY_MEMORY_WINDOW ModifyMemoryWindow
Definition: ntddpcm.h:174
unsigned char * PUCHAR
Definition: retypes.h:3
_In_ ULONGLONG _In_ ULONGLONG CardBase
Definition: ntddpcm.h:140
struct _PCMCIA_INTERFACE_STANDARD PCMCIA_INTERFACE_STANDARD
ULONG MEMORY_SPACE
Definition: ntddpcm.h:92
PCMCIA_WRITE_CONFIG * PPCMCIA_WRITE_CONFIG
Definition: ntddpcm.h:114
_In_ UCHAR VppLevel
Definition: ntddpcm.h:158
_PCMCIA_CONTROLLER_CLASS
Definition: ntddpcm.h:53
#define _In_opt_
Definition: no_sal2.h:213
UCHAR Manufacturer[MANUFACTURER_NAME_LENGTH]
Definition: ntddpcm.h:75
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
PPCMCIA_SET_VPP SetVpp
Definition: ntddpcm.h:175
struct _TUPLE_REQUEST TUPLE_REQUEST
UCHAR DriverName[DRIVER_NAME_LENGTH]
Definition: ntddpcm.h:77
#define MANUFACTURER_NAME_LENGTH
Definition: ntddpcm.h:45
struct _TUPLE_REQUEST * PTUPLE_REQUEST
Definition: bufpool.h:45
typedef _Function_class_(PCMCIA_READ_CONFIG) ULONG(NTAPI PCMCIA_READ_CONFIG)(_In_opt_ PVOID Context
PCMCIA_MODIFY_MEMORY_WINDOW * PPCMCIA_MODIFY_MEMORY_WINDOW
Definition: ntddpcm.h:147
DEFINE_GUID(GUID_PCMCIA_INTERFACE_STANDARD, 0xbed5dadfL, 0x38fb, 0x11d1, 0x94, 0x62, 0x00, 0xc0, 0x4f, 0xb9, 0x60, 0xee)
PPCMCIA_READ_WRITE_CONFIG ReadConfig
Definition: ntddpcm.h:128
unsigned char BOOLEAN
struct _PCMCIA_SOCKET_INFORMATION PCMCIA_SOCKET_INFORMATION
uint64_t ULONGLONG
Definition: typedefs.h:66
#define DRIVER_NAME_LENGTH
Definition: ntddpcm.h:44
struct _PCMCIA_SOCKET_INFORMATION * PPCMCIA_SOCKET_INFORMATION
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: ntddpcm.h:172
PINTERFACE_REFERENCE InterfaceReference
Definition: ntddpcm.h:171
PCMCIA_IS_WRITE_PROTECTED * PPCMCIA_IS_WRITE_PROTECTED
Definition: ntddpcm.h:166
unsigned char UCHAR
Definition: xmlstorage.h:181
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN _In_opt_ ULONG WindowSize
Definition: ntddpcm.h:140
VOID UINTN Length
Definition: acefiex.h:718
_In_ ULONG _In_reads_bytes_(Length) PUCHAR Buffer
Definition: ntddpcm.h:111
struct _PCMCIA_BUS_INTERFACE_STANDARD PCMCIA_BUS_INTERFACE_STANDARD
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN _In_opt_ ULONG _In_opt_ UCHAR AccessSpeed
Definition: ntddpcm.h:140
USHORT Socket
Definition: ntddpcm.h:50
#define _In_
Definition: no_sal2.h:204
UCHAR Identifier[DEVICE_IDENTIFIER_LENGTH]
Definition: ntddpcm.h:76
_In_ ULONG WhichSpace
Definition: ntddpcm.h:99
unsigned short USHORT
Definition: pedump.c:61
struct _PCMCIA_BUS_INTERFACE_STANDARD * PPCMCIA_BUS_INTERFACE_STANDARD
VOID(WINAPI * PINTERFACE_REFERENCE)(PVOID Context)
Definition: precomp.h:13
enum _PCMCIA_CONTROLLER_CLASS PCMCIA_CONTROLLER_CLASS
_In_ ULONGLONG HostBase
Definition: ntddpcm.h:140
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN _In_opt_ ULONG _In_opt_ UCHAR _In_opt_ UCHAR _In_opt_ BOOLEAN IsAttributeMemory
Definition: ntddpcm.h:140
unsigned int ULONG
Definition: retypes.h:1
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN _In_opt_ ULONG _In_opt_ UCHAR _In_opt_ UCHAR BusWidth
Definition: ntddpcm.h:140
VOID(WINAPI * PINTERFACE_DEREFERENCE)(PVOID Context)
Definition: precomp.h:16
PPCMCIA_IS_WRITE_PROTECTED IsWriteProtected
Definition: ntddpcm.h:176
PINTERFACE_REFERENCE InterfaceReference
Definition: ntddpcm.h:126
struct _PCMCIA_INTERFACE_STANDARD * PPCMCIA_INTERFACE_STANDARD
#define DEVICE_IDENTIFIER_LENGTH
Definition: ntddpcm.h:43