ReactOS 0.4.15-dev-7788-g1ad9096
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
29extern "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
49typedef 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
89DEFINE_GUID(GUID_PCMCIA_INTERFACE_STANDARD, \
90 0xbed5dadfL, 0x38fb, 0x11d1, 0x94, 0x62, 0x00, 0xc0, 0x4f, 0xb9, 0x60, 0xee);
91
93
94typedef
95_Function_class_(PCMCIA_READ_CONFIG)
97(NTAPI PCMCIA_READ_CONFIG)(
103typedef PCMCIA_READ_CONFIG *PPCMCIA_READ_CONFIG;
104
105typedef
106_Function_class_(PCMCIA_WRITE_CONFIG)
107ULONG
108(NTAPI PCMCIA_WRITE_CONFIG)(
114typedef 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
135typedef
136_Function_class_(PCMCIA_MODIFY_MEMORY_WINDOW)
138(NTAPI PCMCIA_MODIFY_MEMORY_WINDOW)(
147typedef 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
153typedef
154_Function_class_(PCMCIA_SET_VPP)
156(NTAPI PCMCIA_SET_VPP)(
159typedef PCMCIA_SET_VPP *PPCMCIA_SET_VPP;
160
161typedef
162_Function_class_(PCMCIA_IS_WRITE_PROTECTED)
164(NTAPI PCMCIA_IS_WRITE_PROTECTED)(
166typedef PCMCIA_IS_WRITE_PROTECTED *PPCMCIA_IS_WRITE_PROTECTED;
167
178
179#ifdef __cplusplus
180}
181#endif
182
183#endif /* _NTDDPCMH_ */
unsigned char BOOLEAN
Definition: bufpool.h:45
VOID(WINAPI * PINTERFACE_DEREFERENCE)(PVOID Context)
Definition: precomp.h:16
VOID(WINAPI * PINTERFACE_REFERENCE)(PVOID Context)
Definition: precomp.h:13
#define _Function_class_(x)
Definition: ms_sal.h:2946
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
enum _PCMCIA_CONTROLLER_CLASS PCMCIA_CONTROLLER_CLASS
#define DRIVER_NAME_LENGTH
Definition: ntddpcm.h:44
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
PCMCIA_MODIFY_MEMORY_WINDOW * PPCMCIA_MODIFY_MEMORY_WINDOW
Definition: ntddpcm.h:147
_In_ ULONG WhichSpace
Definition: ntddpcm.h:99
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN _In_opt_ ULONG _In_opt_ UCHAR _In_opt_ UCHAR BusWidth
Definition: ntddpcm.h:145
PCMCIA_SET_VPP * PPCMCIA_SET_VPP
Definition: ntddpcm.h:159
struct _TUPLE_REQUEST TUPLE_REQUEST
PCMCIA_WRITE_CONFIG * PPCMCIA_WRITE_CONFIG
Definition: ntddpcm.h:114
struct _PCMCIA_BUS_INTERFACE_STANDARD PCMCIA_BUS_INTERFACE_STANDARD
PCMCIA_IS_WRITE_PROTECTED * PPCMCIA_IS_WRITE_PROTECTED
Definition: ntddpcm.h:166
_PCMCIA_CONTROLLER_CLASS
Definition: ntddpcm.h:53
@ PcmciaCardBusCompatible
Definition: ntddpcm.h:56
@ PcmciaTrid
Definition: ntddpcm.h:66
@ PcmciaCirrusLogic
Definition: ntddpcm.h:60
@ PcmciaDatabook
Definition: ntddpcm.h:58
@ PcmciaOpti
Definition: ntddpcm.h:65
@ PcmciaNEC
Definition: ntddpcm.h:68
@ PcmciaElcController
Definition: ntddpcm.h:57
@ PcmciaO2Micro
Definition: ntddpcm.h:67
@ PcmciaTI
Definition: ntddpcm.h:61
@ PcmciaIntelCompatible
Definition: ntddpcm.h:55
@ PcmciaNEC_98
Definition: ntddpcm.h:69
@ PcmciaRicoh
Definition: ntddpcm.h:63
@ PcmciaInvalidControllerClass
Definition: ntddpcm.h:54
@ PcmciaPciPcmciaBridge
Definition: ntddpcm.h:59
@ PcmciaTopic
Definition: ntddpcm.h:62
@ PcmciaDatabookCB
Definition: ntddpcm.h:64
_In_ UCHAR VppLevel
Definition: ntddpcm.h:158
#define MANUFACTURER_NAME_LENGTH
Definition: ntddpcm.h:45
struct _PCMCIA_SOCKET_INFORMATION PCMCIA_SOCKET_INFORMATION
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN _In_opt_ ULONG _In_opt_ UCHAR _In_opt_ UCHAR _In_opt_ BOOLEAN IsAttributeMemory
Definition: ntddpcm.h:146
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN _In_opt_ ULONG _In_opt_ UCHAR AccessSpeed
Definition: ntddpcm.h:144
_In_ ULONG _In_reads_bytes_(Length) PUCHAR Buffer
Definition: ntddpcm.h:111
_In_ ULONGLONG HostBase
Definition: ntddpcm.h:140
PCMCIA_READ_CONFIG * PPCMCIA_READ_CONFIG
Definition: ntddpcm.h:103
struct _PCMCIA_INTERFACE_STANDARD PCMCIA_INTERFACE_STANDARD
#define DEVICE_IDENTIFIER_LENGTH
Definition: ntddpcm.h:43
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN _In_opt_ ULONG WindowSize
Definition: ntddpcm.h:143
struct _PCMCIA_INTERFACE_STANDARD * PPCMCIA_INTERFACE_STANDARD
_In_ ULONGLONG _In_ ULONGLONG CardBase
Definition: ntddpcm.h:141
_In_ ULONG _Out_writes_bytes_all_(Length) PUCHAR Buffer
Definition: ntddpcm.h:100
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:142
struct _TUPLE_REQUEST * PTUPLE_REQUEST
ULONG MEMORY_SPACE
Definition: ntddpcm.h:92
enum _PCMCIA_CONTROLLER_CLASS * PPCMCIA_CONTROLLER_CLASS
struct _PCMCIA_BUS_INTERFACE_STANDARD * PPCMCIA_BUS_INTERFACE_STANDARD
struct _PCMCIA_SOCKET_INFORMATION * PPCMCIA_SOCKET_INFORMATION
#define BOOLEAN
Definition: pedump.c:73
unsigned short USHORT
Definition: pedump.c:61
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
PPCMCIA_READ_WRITE_CONFIG ReadConfig
Definition: ntddpcm.h:128
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: ntddpcm.h:127
PPCMCIA_READ_WRITE_CONFIG WriteConfig
Definition: ntddpcm.h:129
PINTERFACE_REFERENCE InterfaceReference
Definition: ntddpcm.h:126
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: ntddpcm.h:172
PPCMCIA_SET_VPP SetVpp
Definition: ntddpcm.h:175
PPCMCIA_IS_WRITE_PROTECTED IsWriteProtected
Definition: ntddpcm.h:176
PPCMCIA_MODIFY_MEMORY_WINDOW ModifyMemoryWindow
Definition: ntddpcm.h:174
PINTERFACE_REFERENCE InterfaceReference
Definition: ntddpcm.h:171
UCHAR Manufacturer[MANUFACTURER_NAME_LENGTH]
Definition: ntddpcm.h:75
UCHAR Identifier[DEVICE_IDENTIFIER_LENGTH]
Definition: ntddpcm.h:76
UCHAR DriverName[DRIVER_NAME_LENGTH]
Definition: ntddpcm.h:77
USHORT Socket
Definition: ntddpcm.h:50
#define NTAPI
Definition: typedefs.h:36
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
unsigned char UCHAR
Definition: xmlstorage.h:181