2002-10-06 Casper Hornstrup <chorns@it.dk>
* include/ddk: New subdir.
* lib/ddk: Ditto.
* include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
xfilter.h): New files.
* lib/ddk/(Makefile.in, apcups.def, cfgmgr32.def, dxapi.def,
hal.def, hid.def, hidparse.def, mcd.def, ndis.def, ntoskrnl.def,
scsiport.def, tdi.def, usbcamd.def, usbcamd2.def, videoprt.def,
win32k.def): Ditto.
2002-10-07 00:18:26 +02:00
|
|
|
/*
|
|
|
|
* ntddpcm.h
|
|
|
|
*
|
|
|
|
* PCMCIA IOCTL interface
|
|
|
|
*
|
* include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
xfilter.h): Change comment to refer w32api package, not MinGW.
2002-11-15 02:08:17 +01:00
|
|
|
* This file is part of the w32api package.
|
2002-10-06 Casper Hornstrup <chorns@it.dk>
* include/ddk: New subdir.
* lib/ddk: Ditto.
* include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
xfilter.h): New files.
* lib/ddk/(Makefile.in, apcups.def, cfgmgr32.def, dxapi.def,
hal.def, hid.def, hidparse.def, mcd.def, ndis.def, ntoskrnl.def,
scsiport.def, tdi.def, usbcamd.def, usbcamd2.def, videoprt.def,
win32k.def): Ditto.
2002-10-07 00:18:26 +02:00
|
|
|
*
|
|
|
|
* Contributors:
|
|
|
|
* Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS NOT COPYRIGHTED
|
|
|
|
*
|
|
|
|
* This source code is offered for use in the public domain. You may
|
|
|
|
* use, modify or distribute it freely.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful but
|
|
|
|
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
|
* include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
xfilter.h): Fix typo in disclaimer comment.
2002-11-12 22:34:07 +01:00
|
|
|
* DISCLAIMED. This includes but is not limited to warranties of
|
2002-10-06 Casper Hornstrup <chorns@it.dk>
* include/ddk: New subdir.
* lib/ddk: Ditto.
* include/ddk/(atm.h, batclass.h, cfg.h, cfgmgr32.h, d4drvif.h,
d4iface.h, ddkmapi.h, hidclass.h, hidpi.h, hidusage.h, mcd.h,
miniport.h, minitape.h, mountdev.h, mountmgr.h, ndis.h,
ndisquid.h, ndistapi.h, ndisvan.h, netevent.h, netpnp.h,
netdev.h, ntapi.h, ntdd8042.h, ntddbeep.h, ntddcdrm.h,
ntddcdvd.h, ntddchgr.h, ntdddisk.h, ntddk.h, ntddkbd.h,
ntddmou.h, ntddndis.h, ntddpar.h, ntddpcm.h, ntddscsi.h,
ntddser.h, ntddstor.h, ntddtape.h, ntddtdi.h, ntddvdeo.h,
ntddvol.h, ntifs.h, ntpoapi.h, ntstatus.h, parallel.h, pfhook.h,
poclass.h, scsi.h, scsiscan.h, scsiwmi.h, smbus.h, srb.h,
storport.h, tdi.h, tdiinfo.h, tdikrnl.h, tdistat.h, tvout.h,
upssvc.h, usb.h, usb100.h, usbcamdi.h, usbdi.h, usbioctl.h,
usbiodef.h, usbscan.h, usbuser.h, video.h, videoagp.h, win2k.h,
winddi.h, winddk.h, winnt4.h, winxp.h, ws2san.h,
xfilter.h): New files.
* lib/ddk/(Makefile.in, apcups.def, cfgmgr32.def, dxapi.def,
hal.def, hid.def, hidparse.def, mcd.def, ndis.def, ntoskrnl.def,
scsiport.def, tdi.def, usbcamd.def, usbcamd2.def, videoprt.def,
win32k.def): Ditto.
2002-10-07 00:18:26 +02:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __NTDDPCM_H
|
|
|
|
#define __NTDDPCM_H
|
|
|
|
|
|
|
|
#if __GNUC__ >=3
|
|
|
|
#pragma GCC system_header
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "ntddk.h"
|
|
|
|
|
|
|
|
#define IOCTL_PCMCIA_BASE FILE_DEVICE_CONTROLLER
|
|
|
|
|
|
|
|
#define DD_PCMCIA_DEVICE_NAME "\\\\.\\Pcmcia"
|
|
|
|
#define DD_PCMCIA_DEVICE_NAME_U L"\\\\.\\Pcmcia"
|
|
|
|
|
|
|
|
#define IOCTL_GET_TUPLE_DATA \
|
|
|
|
CTL_CODE(IOCTL_PCMCIA_BASE, 3000, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
|
|
|
|
|
|
|
#define IOCTL_SOCKET_INFORMATION \
|
|
|
|
CTL_CODE(IOCTL_PCMCIA_BASE, 3004, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
|
|
|
|
|
|
|
#define DEVICE_IDENTIFIER_LENGTH 64
|
|
|
|
#define DRIVER_NAME_LENGTH 32
|
|
|
|
#define MANUFACTURER_NAME_LENGTH 64
|
|
|
|
|
|
|
|
#define PcmciaInvalidControllerType 0xffffffff
|
|
|
|
|
|
|
|
typedef struct _TUPLE_REQUEST {
|
|
|
|
USHORT Socket;
|
|
|
|
} TUPLE_REQUEST, *PTUPLE_REQUEST;
|
|
|
|
|
|
|
|
typedef enum _PCMCIA_CONTROLLER_CLASS {
|
|
|
|
PcmciaInvalidControllerClass = -1,
|
|
|
|
PcmciaIntelCompatible,
|
|
|
|
PcmciaCardBusCompatible,
|
|
|
|
PcmciaElcController,
|
|
|
|
PcmciaDatabook,
|
|
|
|
PcmciaPciPcmciaBridge,
|
|
|
|
PcmciaCirrusLogic,
|
|
|
|
PcmciaTI,
|
|
|
|
PcmciaTopic,
|
|
|
|
PcmciaRicoh,
|
|
|
|
PcmciaDatabookCB,
|
|
|
|
PcmciaOpti,
|
|
|
|
PcmciaTrid,
|
|
|
|
PcmciaO2Micro,
|
|
|
|
PcmciaNEC,
|
|
|
|
PcmciaNEC_98
|
|
|
|
} PCMCIA_CONTROLLER_CLASS, *PPCMCIA_CONTROLLER_CLASS;
|
|
|
|
|
|
|
|
typedef struct _PCMCIA_SOCKET_INFORMATION {
|
|
|
|
USHORT Socket;
|
|
|
|
USHORT TupleCrc;
|
|
|
|
UCHAR Manufacturer[MANUFACTURER_NAME_LENGTH];
|
|
|
|
UCHAR Identifier[DEVICE_IDENTIFIER_LENGTH];
|
|
|
|
UCHAR DriverName[DRIVER_NAME_LENGTH];
|
|
|
|
UCHAR DeviceFunctionId;
|
|
|
|
UCHAR Reserved;
|
|
|
|
UCHAR CardInSocket;
|
|
|
|
UCHAR CardEnabled;
|
|
|
|
ULONG ControllerType;
|
|
|
|
} PCMCIA_SOCKET_INFORMATION, *PPCMCIA_SOCKET_INFORMATION;
|
|
|
|
|
|
|
|
#define PcmciaClassFromControllerType(type) ((PCMCIA_CONTROLLER_CLASS)((type) & 0xff))
|
|
|
|
#define PcmciaModelFromControllerType(type) (((type) >> 8) & 0x3ffff)
|
|
|
|
#define PcmciaRevisionFromControllerType(type) ((type) >> 26)
|
|
|
|
|
|
|
|
|
|
|
|
DEFINE_GUID(GUID_PCMCIA_INTERFACE_STANDARD, \
|
|
|
|
0xbed5dadfL, 0x38fb, 0x11d1, 0x94, 0x62, 0x00, 0xc0, 0x4f, 0xb9, 0x60, 0xee);
|
|
|
|
|
|
|
|
typedef ULONG MEMORY_SPACE;
|
|
|
|
|
|
|
|
typedef ULONG STDCALL
|
|
|
|
(*PPCMCIA_READ_WRITE_CONFIG)(
|
|
|
|
IN PVOID Context,
|
|
|
|
IN ULONG WhichSpace,
|
|
|
|
IN PUCHAR Buffer,
|
|
|
|
IN ULONG Offset,
|
|
|
|
IN ULONG Length);
|
|
|
|
|
|
|
|
#define PCCARD_PCI_CONFIGURATION_SPACE 0
|
|
|
|
#define PCCARD_ATTRIBUTE_MEMORY 1
|
|
|
|
#define PCCARD_COMMON_MEMORY 2
|
|
|
|
#define PCCARD_ATTRIBUTE_MEMORY_INDIRECT 3
|
|
|
|
#define PCCARD_COMMON_MEMORY_INDIRECT 4
|
|
|
|
|
|
|
|
typedef struct _PCMCIA_BUS_INTERFACE_STANDARD {
|
|
|
|
USHORT Size;
|
|
|
|
USHORT Version;
|
|
|
|
PVOID Context;
|
|
|
|
PINTERFACE_REFERENCE InterfaceReference;
|
|
|
|
PINTERFACE_DEREFERENCE InterfaceDereference;
|
|
|
|
PPCMCIA_READ_WRITE_CONFIG ReadConfig;
|
|
|
|
PPCMCIA_READ_WRITE_CONFIG WriteConfig;
|
|
|
|
} PCMCIA_BUS_INTERFACE_STANDARD, *PPCMCIA_BUS_INTERFACE_STANDARD;
|
|
|
|
|
|
|
|
#define PCMCIA_MEMORY_8BIT_ACCESS 0
|
|
|
|
#define PCMCIA_MEMORY_16BIT_ACCESS 1
|
|
|
|
|
|
|
|
typedef BOOLEAN STDCALL
|
|
|
|
(*PPCMCIA_MODIFY_MEMORY_WINDOW)(
|
|
|
|
IN PVOID Context,
|
|
|
|
IN ULONGLONG HostBase,
|
|
|
|
IN ULONGLONG CardBase,
|
|
|
|
IN BOOLEAN Enable,
|
|
|
|
IN ULONG WindowSize OPTIONAL,
|
|
|
|
IN UCHAR AccessSpeed OPTIONAL,
|
|
|
|
IN UCHAR BusWidth OPTIONAL,
|
|
|
|
IN BOOLEAN IsAttributeMemory OPTIONAL);
|
|
|
|
|
|
|
|
#define PCMCIA_VPP_0V 0
|
|
|
|
#define PCMCIA_VPP_12V 1
|
|
|
|
#define PCMCIA_VPP_IS_VCC 2
|
|
|
|
|
|
|
|
typedef BOOLEAN STDCALL
|
|
|
|
(*PPCMCIA_SET_VPP)(
|
|
|
|
IN PVOID Context,
|
|
|
|
IN UCHAR VppLevel);
|
|
|
|
|
|
|
|
typedef BOOLEAN STDCALL
|
|
|
|
(*PPCMCIA_IS_WRITE_PROTECTED)(
|
|
|
|
IN PVOID Context);
|
|
|
|
|
|
|
|
typedef struct _PCMCIA_INTERFACE_STANDARD {
|
|
|
|
USHORT Size;
|
|
|
|
USHORT Version;
|
|
|
|
PINTERFACE_REFERENCE InterfaceReference;
|
|
|
|
PINTERFACE_DEREFERENCE InterfaceDereference;
|
|
|
|
PVOID Context;
|
|
|
|
PPCMCIA_MODIFY_MEMORY_WINDOW ModifyMemoryWindow;
|
|
|
|
PPCMCIA_SET_VPP SetVpp;
|
|
|
|
PPCMCIA_IS_WRITE_PROTECTED IsWriteProtected;
|
|
|
|
} PCMCIA_INTERFACE_STANDARD, *PPCMCIA_INTERFACE_STANDARD;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __NTDDPCM_H */
|