4 #define USB_TRANSFER 0x983
5 #define EVENT_UNREGISTER 0x987
6 #define INT_DISABLE 0x91f
8 #define CARD_REGISTER 0x9a4
9 #define EVENT_REGISTER 0x9a5
10 #define CARD_UNREGISTER 0x92b
11 #define USB_GET_DEVICE_DATA 0x9a7
12 #define INT_ENABLE 0x98e
13 #define EVENT_PULL 0x988
14 #define USB_SET_INTERFACE 0x981
16 #define MAGIC 0xa410b413UL
18 struct header_struct
{
24 struct version_struct
{
25 unsigned long versionul
;
29 struct license_struct
{
30 char cLicense
[128]; // Buffer with license string to put.
31 // If empty string then get current license setting
33 unsigned long dwLicense
; // Returns license settings: LICENSE_DEMO, LICENSE_WD
34 // etc..., or 0 for invalid license.
35 unsigned long dwLicense2
; // Returns additional license settings, if dwLicense
36 // could not hold all the information.
37 // Then dwLicense will return 0.
42 unsigned long dwVendorId
;
43 unsigned long dwDeviceId
;
50 unsigned long dwFunction
;
55 unsigned long dwVendorId
;
56 unsigned long dwProductId
;
61 unsigned short VendorId
;
62 unsigned short ProductId
;
63 unsigned char bDeviceClass
;
64 unsigned char bDeviceSubClass
;
65 unsigned char bInterfaceClass
;
66 unsigned char bInterfaceSubClass
;
67 unsigned char bInterfaceProtocol
;
72 unsigned long dwNumber
; // Pipe 0 is the default pipe
73 unsigned long dwMaximumPacketSize
;
74 unsigned long type
; // USB_PIPE_TYPE
75 unsigned long direction
; // WDU_DIR
76 // Isochronous, Bulk, Interrupt are either USB_DIR_IN or USB_DIR_OUT
77 // Control are USB_DIR_IN_OUT
78 unsigned long dwInterval
; // interval in ms relevant to Interrupt pipes
79 } WD_USB_PIPE_INFO
, WD_USB_PIPE_INFO_V43
, WDU_PIPE_INFO
;
81 #define WD_USB_MAX_PIPE_NUMBER 32
85 unsigned long dwPipes
;
86 WD_USB_PIPE_INFO Pipe
[WD_USB_MAX_PIPE_NUMBER
];
87 } WD_USB_DEVICE_INFO
, WD_USB_DEVICE_INFO_V43
;
91 unsigned long dwUniqueID
;
92 unsigned long dwPipeNum
; // Pipe number on device.
93 unsigned long fRead
; // TRUE for read (IN) transfers; FALSE for write (OUT) transfers.
94 unsigned long dwOptions
; // USB_TRANSFER options:
95 // USB_ISOCH_FULL_PACKETS_ONLY - For isochronous
96 // transfers only. If set, only full packets will be
97 // transmitted and the transfer function will return
98 // when the amount of bytes left to transfer is less
99 // than the maximum packet size for the pipe (the
100 // function will return without transmitting the
102 void* pBuffer
; // Pointer to buffer to read/write.
103 unsigned long dwBufferSize
; // Amount of bytes to transfer.
104 unsigned long dwBytesTransferred
; // Returns the number of bytes actually read/written
105 unsigned char SetupPacket
[8]; // Setup packet for control pipe transfer.
106 unsigned long dwTimeout
; // Timeout for the transfer in milliseconds. Set to 0 for infinite wait.
113 unsigned long handle
;
114 unsigned long dwAction
; // WD_EVENT_ACTION
115 unsigned long dwStatus
; // EVENT_STATUS
116 unsigned long dwEventId
;
117 unsigned long dwCardType
; //WD_BUS_PCI, WD_BUS_USB, WD_BUS_PCMCIA
118 unsigned long hKernelPlugIn
;
119 unsigned long dwOptions
; // WD_EVENT_OPTION
130 unsigned long dwUniqueID
;
133 unsigned long dwEventVer
;
134 unsigned long dwNumMatchTables
;
135 WDU_MATCH_TABLE matchTables
[1];
140 unsigned long dwBusType
; // Bus Type: ISA, EISA, PCI, PCMCIA.
141 unsigned long dwBusNum
; // Bus number.
142 unsigned long dwSlotFunc
; // Slot number on Bus.
143 } WD_BUS
, WD_BUS_V30
;
147 unsigned long item
; // ITEM_TYPE
148 unsigned long fNotSharable
;
149 unsigned long dwReserved
; // Reserved for internal use
150 unsigned long dwOptions
; // WD_ITEM_OPTIONS
155 unsigned long dwPhysicalAddr
; // Physical address on card.
156 unsigned long dwBytes
; // Address range.
157 void* dwTransAddr
; // Returns the address to pass on to transfer commands.
158 void* dwUserDirectAddr
; // Returns the address for direct user read/write.
159 unsigned long dwCpuPhysicalAddr
; // Returns the CPU physical address
160 unsigned long dwBar
; // Base Address Register number of PCI card.
164 void* dwAddr
; // Beginning of io address.
165 unsigned long dwBytes
; // IO range.
166 unsigned long dwBar
; // Base Address Register number of PCI card.
170 unsigned long dwInterrupt
; // Number of interrupt to install.
171 unsigned long dwOptions
; // Interrupt options. For level sensitive
172 // interrupts - set to: INTERRUPT_LEVEL_SENSITIVE.
173 unsigned long hInterrupt
; // Returns the handle of the interrupt installed.
175 WD_BUS Bus
; // ITEM_BUS
178 unsigned long dw1
, dw2
, dw3
, dw4
; // Reserved for internal use
179 void* dw5
; // Reserved for internal use
182 } WD_ITEMS
, WD_ITEMS_V30
;
184 #define WD_CARD_ITEMS 20
188 unsigned long dwItems
;
189 WD_ITEMS Item
[WD_CARD_ITEMS
];
190 } WD_CARD
, WD_CARD_V30
;
192 enum { CARD_VX_NO_MMU_INIT
= 0x4000000 };
196 WD_CARD Card
; // Card to register.
197 unsigned long fCheckLockOnly
; // Only check if card is lockable, return hCard=1 if OK.
198 unsigned long hCard
; // Handle of card.
199 unsigned long dwOptions
; // Should be zero.
200 char cName
[32]; // Name of card.
201 char cDescription
[100]; // Description.