Jungo WinDriver  
Official Documentation
wdc_lib.h
Go to the documentation of this file.
1/* @JUNGO_COPYRIGHT@ */
2
3#ifndef _WDC_LIB_H_
4#define _WDC_LIB_H_
5
6/*********************************************************************
7* File: wdc_lib.h - Shared WD card (WDC) library header. *
8* This file defines the WDC library's high-level *
9* interface *
10**********************************************************************/
11
12#if defined(__KERNEL__)
13 #include "kpstdlib.h"
14#endif
15#include "windrvr.h"
16#include "windrvr_int_thread.h"
17#include "windrvr_events.h"
18#include "bits.h"
19#include "pci_regs.h"
20
21#ifdef __cplusplus
22 extern "C" {
23#endif
24/**************************************************************
25 General definitions
26 **************************************************************/
27
28#define MAX_NAME 128
29#define MAX_DESC 128
30#define MAX_NAME_DISPLAY 22
31
33typedef void *WDC_DEVICE_HANDLE;
34
35#ifndef __KERNEL__
37typedef struct {
43
44#if defined(PLATFORM_API)
49typedef struct {
53 PHYS_ADDR pDeviceAddresses[WD_PLATFORM_CARDS];
56#endif /* defined(PLATFORM_API) */
57
58#endif /* __KERNEL__ */
59
61typedef struct {
62 DWORD dwNumCaps;
66
67/* Driver open options */
68/* Basic driver open flags */
69#define WDC_DRV_OPEN_CHECK_VER 0x1
72#define WDC_DRV_OPEN_REG_LIC 0x2
73#define WDC_DRV_OPEN_AGENT_DEFAULT_WAIT 0x10
74#define WDC_DRV_OPEN_AGENT_LONG_WAIT 0x20
76#define WDC_DRV_OPEN_AGENT_INFINITE_WAIT 0x40
78/* Convenient driver open options */
79#define WDC_DRV_OPEN_BASIC 0x0
83#define WDC_DRV_OPEN_KP WDC_DRV_OPEN_BASIC
85#define WDC_DRV_OPEN_ALL (WDC_DRV_OPEN_CHECK_VER | WDC_DRV_OPEN_REG_LIC | WDC_DRV_OPEN_AGENT_DEFAULT_WAIT)
86#if defined(__KERNEL__)
87 #define WDC_DRV_OPEN_DEFAULT WDC_DRV_OPEN_KP
88#else
89 #define WDC_DRV_OPEN_DEFAULT WDC_DRV_OPEN_CHECK_VER | WDC_DRV_OPEN_REG_LIC
90#endif
92
93/* Debug information display options */
94#define WDC_DBG_OUT_DBM 0x1
96#define WDC_DBG_OUT_FILE 0x2
99#define WDC_DBG_LEVEL_ERR 0x10
100#define WDC_DBG_LEVEL_TRACE 0x20
103#define WDC_DBG_NONE 0x100
106#define WDC_DBG_DEFAULT (WDC_DBG_OUT_DBM | WDC_DBG_LEVEL_TRACE)
107
108#define WDC_DBG_DBM_ERR (WDC_DBG_OUT_DBM | WDC_DBG_LEVEL_ERR)
109#define WDC_DBG_DBM_TRACE (WDC_DBG_OUT_DBM | WDC_DBG_LEVEL_TRACE)
110
111#if !defined(__KERNEL__)
112 #define WDC_DBG_FILE_ERR (WDC_DBG_OUT_FILE | WDC_DBG_LEVEL_ERR)
113 #define WDC_DBG_FILE_TRACE (WDC_DBG_OUT_FILE | WDC_DBG_LEVEL_TRACE)
114
115 #define WDC_DBG_DBM_FILE_ERR \
116 (WDC_DBG_OUT_DBM | WDC_DBG_OUT_FILE | WDC_DBG_LEVEL_ERR)
117 #define WDC_DBG_DBM_FILE_TRACE \
118 (WDC_DBG_OUT_DBM | WDC_DBG_OUT_FILE | WDC_DBG_LEVEL_TRACE)
119
120 #define WDC_DBG_FULL \
121 (WDC_DBG_OUT_DBM | WDC_DBG_OUT_FILE | WDC_DBG_LEVEL_TRACE)
122#else
123 #define WDC_DBG_FULL (WDC_DBG_OUT_DBM | WDC_DBG_LEVEL_TRACE)
124#endif
125
126typedef DWORD WDC_DBG_OPTIONS;
127
129#define WDC_SLEEP_BUSY 0
130#define WDC_SLEEP_NON_BUSY SLEEP_NON_BUSY
131typedef DWORD WDC_SLEEP_OPTIONS;
132
133/* -----------------------------------------------
134 Memory / I/O / Registers
135 ----------------------------------------------- */
137struct WDC_ADDR_DESC;
138
139typedef enum {
141 WDC_READ = 0x2,
144
146typedef enum {
147 WDC_ADDR_RW_DEFAULT = 0x0,
152
153/* Memory/I/O address size and access mode definitions (size - in bytes) */
154#define WDC_SIZE_8 ((DWORD)sizeof(BYTE))
155#define WDC_SIZE_16 ((DWORD)sizeof(WORD))
156#define WDC_SIZE_32 ((DWORD)sizeof(UINT32))
157#define WDC_SIZE_64 ((DWORD)sizeof(UINT64))
158typedef DWORD WDC_ADDR_SIZE;
159
160typedef enum {
166
167#define WDC_ADDR_MODE_TO_SIZE(mode) (UINT64)mode
168#define WDC_ADDR_SIZE_TO_MODE(size) (((size) > WDC_SIZE_32) ? WDC_MODE_64 : \
169 ((size) > WDC_SIZE_16) ? WDC_MODE_32 : \
170 ((size) > WDC_SIZE_8) ? WDC_MODE_16 : WDC_MODE_8)
171
173#define WDC_AD_CFG_SPACE 0xFF
174
175/**************************************************************
176 Function Prototypes
177 **************************************************************/
178/* -----------------------------------------------
179 General
180 ----------------------------------------------- */
193
202
210
220DWORD DLLCALLCONV WDC_Sleep(_In_ DWORD dwMicroSecs,
221 _In_ WDC_SLEEP_OPTIONS options);
222
242DWORD DLLCALLCONV WDC_Version(_Outptr_ CHAR *pcVersion, _In_ DWORD dwLen,
243 _Outptr_ DWORD *pdwVersion);
244
274 _In_ const CHAR *pcLicense);
275
289
293#ifndef __KERNEL__
318DWORD DLLCALLCONV WDC_PciScanDevices(_In_ DWORD dwVendorId,
319 _In_ DWORD dwDeviceId, _Outptr_ WDC_PCI_SCAN_RESULT *pPciScanResult);
320
346 _In_ DWORD dwDeviceId, _Outptr_ WDC_PCI_SCAN_RESULT *pPciScanResult);
347
373 _In_ DWORD dwDeviceId, _Outptr_ WDC_PCI_SCAN_RESULT *pPciScanResult);
374
375#if defined(PLATFORM_API)
392DWORD DLLCALLCONV WDC_PlatformScanDevices(_In_ const CHAR *pcDeviceName,
393 _In_ PHYS_ADDR pSearchAddr,
394 _Outptr_ WDC_PLATFORM_SCAN_RESULT *pPlatformScanResult);
395#endif
396
416DWORD DLLCALLCONV WDC_ScanDevices(_In_ DWORD dwVendorId,
417 _In_ DWORD dwDeviceId, _Outptr_ WDC_PCI_SCAN_RESULT *pPciScanResult
418#if defined(PLATFORM_API)
419 , _In_ const CHAR *pcDeviceName, _In_ PHYS_ADDR pSearchAddr,
420 _Outptr_ WDC_PLATFORM_SCAN_RESULT *pPlatformScanResult
421#endif
422 );
423#endif
424
443 _Outptr_ DWORD *pdwOffset);
460 _Outptr_ WDC_PCI_HEADER_TYPE *pHeaderType);
461
478 _In_ DWORD dwCapId, _Outptr_ WDC_PCI_SCAN_CAPS_RESULT *pScanCapsResult);
479
497 _In_ DWORD dwCapId, _Outptr_ WDC_PCI_SCAN_CAPS_RESULT *pScanCapsResult);
498
517 _In_ DWORD dwCapId, _Outptr_ WDC_PCI_SCAN_CAPS_RESULT *pScanCapsResult);
518
529
540
544#ifndef __KERNEL__
559
560#if defined(PLATFORM_API)
574 _Inout_ WD_PLATFORM_CARD_INFO *pDeviceInfo);
575#endif
576
591#if defined(PLATFORM_API)
592 , _Inout_ WD_PLATFORM_CARD_INFO *pPlatformInfo
593#endif
594 );
595
596#endif
597
621 _In_ DWORD dwNumVFs);
622
635
650 _Outptr_ DWORD *pdwNumVFs);
651
655#if !defined(__KERNEL__)
683 _In_ const WD_PCI_CARD_INFO *pDeviceInfo, _In_ const PVOID pDevCtx);
684
714 _In_ const WD_CARD *pDeviceInfo, _In_ const PVOID pDevCtx);
715
716#if defined(PLATFORM_API)
734 _In_ const WD_PLATFORM_CARD_INFO *pDeviceInfo, _In_ const PVOID pDevCtx);
735#endif
736
753 _In_ const WD_PCI_CARD_INFO *pPciDeviceInfo,
754#if defined(PLATFORM_API)
755 _In_ const WD_PLATFORM_CARD_INFO *pPlatformDeviceInfo,
756#endif
757 _In_ const PVOID pDevCtx);
758
772
784
797#endif
798
799/* -----------------------------------------------
800 Reset PCI device
801 ----------------------------------------------- */
817
852 _In_ WD_TRANSFER *pTransCmds, _In_ DWORD dwCmds, _In_ BOOL fForceCleanup);
853
872 _In_ const CHAR *pcKPDriverName, _In_ PVOID pKPOpenData);
873
899 _In_ DWORD dwMsg, _Inout_ PVOID pData, _Outptr_ PDWORD pdwResult);
900
909#define WDC_ReadMem8(addr, off) *(volatile BYTE *)((UPTR)(addr) + (UPTR)(off))
910
914#define WDC_ReadMem16(addr, off) \
915 *(volatile WORD *)((UPTR)(addr) + (UPTR)(off))
916
920#define WDC_ReadMem32(addr, off) \
921 *(volatile UINT32 *)((UPTR)(addr) + (UPTR)(off))
922
926#define WDC_ReadMem64(addr, off) \
927 *(volatile UINT64 *)((UPTR)(addr) + (UPTR)(off))
928
929
933#define WDC_WriteMem8(addr, off, val) \
934 *(volatile BYTE * )(((UPTR)(addr) + (UPTR)(off))) = (val)
935
939#define WDC_WriteMem16(addr, off, val) \
940 *(volatile WORD * )(((UPTR)(addr) + (UPTR)(off))) = (val)
941
945#define WDC_WriteMem32(addr, off, val) \
946 *(volatile UINT32 *)(((UPTR)(addr) + (UPTR)(off))) = (val)
947
951#define WDC_WriteMem64(addr, off, val) \
952 *(volatile UINT64 *)(((UPTR)(addr) + (UPTR)(off))) = (val)
953
954
972 _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _Outptr_ BYTE *pbVal);
973
989 _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _Outptr_ WORD *pwVal);
990
1006 _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _Outptr_ UINT32 *pdwVal);
1007
1023 _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _Outptr_ UINT64 *pqwVal);
1024
1039 _In_ KPTR dwOffset, _In_ BYTE *pbVal);
1040
1055 _In_ KPTR dwOffset, _In_ WORD *pwVal);
1056
1071 _In_ KPTR dwOffset, _In_ UINT32 *pdwVal);
1072
1087 _In_ KPTR dwOffset, _In_ UINT64 *pqwVal);
1088
1103 _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _In_ BYTE bVal);
1104
1119 _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _In_ WORD wVal);
1120
1135 _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _In_ UINT32 dwVal);
1136
1151 _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _In_ UINT64 qwVal);
1152
1166 _In_ KPTR dwOffset, _In_ BYTE bVal);
1167
1181 _In_ KPTR dwOffset, _In_ WORD wVal);
1182
1196 _In_ KPTR dwOffset, _In_ UINT32 dwVal);
1197
1211 _In_ KPTR dwOffset, _In_ UINT64 qwVal);
1212
1213
1235 _In_ DWORD dwAddrSpace,_In_ KPTR dwOffset, _In_ UINT64 u64Bytes,
1236 _Outptr_ PVOID pData, _In_ WDC_ADDR_MODE mode,
1237 _In_ WDC_ADDR_RW_OPTIONS options);
1238
1259 _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _In_ UINT64 u64Bytes,
1260 _In_ PVOID pData, _In_ WDC_ADDR_MODE mode,
1261 _In_ WDC_ADDR_RW_OPTIONS options);
1262
1264/* @snippet highlevel_examples.c WDC_ReadAddrBlock8 */
1265#define WDC_ReadAddrBlock8(hDev,dwAddrSpace,dwOffset,dwBytes,pData,options) \
1266 WDC_ReadAddrBlock(hDev, dwAddrSpace, dwOffset, dwBytes, pData, \
1267 WDC_MODE_8, options)
1268
1270/* @snippet highlevel_examples.c WDC_ReadAddrBlock16 */
1271#define WDC_ReadAddrBlock16(hDev,dwAddrSpace,dwOffset,dwBytes,pData,options) \
1272 WDC_ReadAddrBlock(hDev, dwAddrSpace, dwOffset, dwBytes, pData, \
1273 WDC_MODE_16, options)
1274
1276/* @snippet highlevel_examples.c WDC_ReadAddrBlock32 */
1277#define WDC_ReadAddrBlock32(hDev,dwAddrSpace,dwOffset,dwBytes,pData,options) \
1278 WDC_ReadAddrBlock(hDev, dwAddrSpace, dwOffset, dwBytes, pData, \
1279 WDC_MODE_32, options)
1280
1282/* @snippet highlevel_examples.c WDC_ReadAddrBlock64 */
1283#define WDC_ReadAddrBlock64(hDev,dwAddrSpace,dwOffset,dwBytes,pData,options) \
1284 WDC_ReadAddrBlock(hDev, dwAddrSpace, dwOffset, dwBytes, pData, \
1285 WDC_MODE_64, options)
1286
1288/* @snippet highlevel_examples.c WDC_WriteAddrBlock8 */
1289#define WDC_WriteAddrBlock8(hDev,dwAddrSpace,dwOffset,dwBytes,pData,options) \
1290 WDC_WriteAddrBlock(hDev, dwAddrSpace, dwOffset, dwBytes, pData, \
1291 WDC_MODE_8, options)
1292
1294/* @snippet highlevel_examples.c WDC_WriteAddrBlock16 */
1295#define WDC_WriteAddrBlock16(hDev,dwAddrSpace,dwOffset,dwBytes,pData,options) \
1296 WDC_WriteAddrBlock(hDev, dwAddrSpace, dwOffset, dwBytes, pData, \
1297 WDC_MODE_16, options)
1298
1300/* @snippet highlevel_examples.c WDC_WriteAddrBlock32 */
1301#define WDC_WriteAddrBlock32(hDev,dwAddrSpace,dwOffset,dwBytes,pData,options) \
1302 WDC_WriteAddrBlock(hDev, dwAddrSpace, dwOffset, dwBytes, pData, \
1303 WDC_MODE_32, options)
1304
1306/* @snippet highlevel_examples.c WDC_WriteAddrBlock64 */
1307#define WDC_WriteAddrBlock64(hDev,dwAddrSpace,dwOffset,dwBytes,pData,options) \
1308 WDC_WriteAddrBlock(hDev, dwAddrSpace, dwOffset, dwBytes, pData, \
1309 WDC_MODE_64, options)
1310
1322 _In_ DWORD dwNumTrans);
1323
1336 _In_ DWORD dwAddrSpace);
1337
1362 _In_ DWORD dwOffset, _Outptr_ PVOID pData, _In_ DWORD dwBytes);
1363
1381 _In_ DWORD dwOffset, _In_ PVOID pData, _In_ DWORD dwBytes);
1382
1383
1402 _In_ DWORD dwOffset, _Outptr_ PVOID pData, _In_ DWORD dwBytes);
1403
1419 _In_ DWORD dwOffset, _In_ PVOID pData, _In_ DWORD dwBytes);
1420
1441 _In_ DWORD dwOffset, _Outptr_ BYTE *pbVal);
1442
1460 _In_ DWORD dwOffset, _Outptr_ WORD *pwVal);
1461
1479 _In_ DWORD dwOffset, _Outptr_ UINT32 *pdwVal);
1480
1498 _In_ DWORD dwOffset, _Outptr_ UINT64 *pqwVal);
1499
1516 _In_ DWORD dwOffset, _In_ BYTE bVal);
1517
1534 _In_ DWORD dwOffset, _In_ WORD wVal);
1535
1553 _In_ DWORD dwOffset, _In_ UINT32 dwVal);
1554
1571 _In_ DWORD dwOffset, _In_ UINT64 qwVal);
1572
1591 _In_ DWORD dwOffset, _Outptr_ BYTE *pbVal);
1592
1608 _In_ DWORD dwOffset, _Outptr_ WORD *pwVal);
1609
1625 _In_ DWORD dwOffset, _Outptr_ UINT32 *pdwVal);
1626
1642 _In_ DWORD dwOffset, _Outptr_ UINT64 *pqwVal);
1643
1658 _In_ DWORD dwOffset, _In_ BYTE bVal);
1659
1674 _In_ DWORD dwOffset, _In_ WORD wVal);
1675
1690 _In_ DWORD dwOffset, _In_ UINT32 dwVal);
1691
1706 _In_ DWORD dwOffset, _In_ UINT64 qwVal);
1707
1711#if !defined(__KERNEL__)
1760 _Outptr_ PVOID *ppBuf, _In_ DWORD dwOptions, _In_ DWORD dwDMABufSize,
1761 _Outptr_ WD_DMA **ppDma);
1762
1799 _In_ PVOID pBuf, _In_ DWORD dwOptions, _In_ DWORD dwDMABufSize,
1800 _Outptr_ WD_DMA **ppDma);
1801
1802
1803typedef struct {
1808 PVOID pData;
1811
1857 _Outptr_ PVOID *ppBuf, _In_ DWORD dwOptions, _In_ DWORD dwDMABufSize,
1858 _Outptr_ WD_DMA **ppDma, _In_ WDC_INTERRUPT_PARAMS *pInterruptParams,
1859 _In_ DWORD dwAlignment);
1860
1903 _In_ PVOID pBuf, _In_ DWORD dwOptions, _In_ DWORD dwDMABufSize,
1904 _Outptr_ WD_DMA **ppDma, _In_ WDC_INTERRUPT_PARAMS *pInterruptParams,
1905 _In_ DWORD dwMaxTransferSize, _In_ DWORD dwTransferElementSize);
1906
1935 _In_ DMA_TRANSACTION_CALLBACK funcDMATransactionCallback,
1936 _In_ PVOID DMATransactionCallbackCtx);
1937
1964 _In_ BOOL fRunCallback);
1965
1985
2006
2044 _In_ PHYS_ADDR qwAddr, _Outptr_ PVOID *ppBuf, _In_ DWORD dwOptions,
2045 _In_ DWORD dwDMABufSize, _Outptr_ WD_DMA **ppDma);
2046
2047
2068
2071#define WDC_DMAGetGlobalHandle(pDma) ((pDma)->hDma)
2072
2088DWORD DLLCALLCONV WDC_DMABufGet(_In_ DWORD hDma, _Outptr_ WD_DMA **ppDma);
2089
2109
2129#endif
2130/* -----------------------------------------------
2131 Interrupts
2132 ----------------------------------------------- */
2133#if !defined(__KERNEL__)
2271 _In_ WD_TRANSFER *pTransCmds, _In_ DWORD dwNumCmds, _In_ DWORD dwOptions,
2272 _In_ INT_HANDLER funcIntHandler, _In_ PVOID pData, _In_ BOOL fUseKP);
2273
2290
2291#endif
2292
2308
2323const CHAR * DLLCALLCONV WDC_IntType2Str(_In_ DWORD dwIntType);
2324
2329#if !defined(__KERNEL__)
2386 _In_ DWORD dwActions, _In_ EVENT_HANDLER funcEventHandler,
2387 _In_ PVOID pData, _In_ BOOL fUseKP);
2388
2403
2404#endif
2405
2420
2462 _In_ const CHAR *pcDbgFile);
2463
2475void DLLCALLCONV WDC_Err(const CHAR *format, ...);
2476
2487void DLLCALLCONV WDC_Trace(const CHAR *format, ...);
2488
2489#ifdef __cplusplus
2490}
2491#endif
2492
2493#endif /* _WDC_LIB_H_ */
2494
WDC_PCI_HEADER_TYPE
Definition: pci_regs.h:15
DWORD dwAddrSpace
Address space number.
Definition: wdc_defs.h:28
Address space information struct.
Definition: wdc_defs.h:27
INT_HANDLER funcIntHandler
Definition: wdc_lib.h:1807
WD_TRANSFER * pTransCmds
Definition: wdc_lib.h:1804
DWORD dwNumCaps
Number of matching PCI capabilities.
Definition: wdc_lib.h:62
PCI capabilities scan results.
Definition: wdc_lib.h:61
DWORD dwNumDevices
Number of matching devices.
Definition: wdc_lib.h:38
PCI scan results.
Definition: wdc_lib.h:37
DWORD dwNumDevices
Number of matching devices.
Definition: wdc_lib.h:50
Platform scan results.
Definition: wdc_lib.h:49
DWORD DLLCALLCONV WDC_DeviceClose(_In_ WDC_DEVICE_HANDLE hDev)
Uninitializes a WDC device structure (PCI, ISA, or Platform) and frees the memory allocated for it.
DWORD DLLCALLCONV WDC_DMAReservedBufLock(_In_ WDC_DEVICE_HANDLE hDev, _In_ PHYS_ADDR qwAddr, _Outptr_ PVOID *ppBuf, _In_ DWORD dwOptions, _In_ DWORD dwDMABufSize, _Outptr_ WD_DMA **ppDma)
Locks a physical reserved memory buffer for DMA and returns the corresponding user mode address of lo...
DWORD WDC_SLEEP_OPTIONS
Definition: wdc_lib.h:131
DWORD DLLCALLCONV WDC_WriteAddrByAddrDesc16(_In_ struct WDC_ADDR_DESC *pAddrDesc, _In_ KPTR dwOffset, _In_ WORD wVal)
Writes 2 byte (16 bits) to a specified memory or I/O address.
DWORD DLLCALLCONV WDC_GetDeviceInfo(_Inout_ WD_PCI_CARD_INFO *pPciDeviceInfo, _Inout_ WD_PLATFORM_CARD_INFO *pPlatformInfo)
A general-purpose function to retrieve device resources.
#define WDC_SIZE_64
Definition: wdc_lib.h:157
DWORD DLLCALLCONV WDC_DMASGBufLock(_In_ WDC_DEVICE_HANDLE hDev, _In_ PVOID pBuf, _In_ DWORD dwOptions, _In_ DWORD dwDMABufSize, _Outptr_ WD_DMA **ppDma)
Locks a pre-allocated user-mode memory buffer for DMA and returns the corresponding physical mappings...
DWORD DLLCALLCONV WDC_IsaDeviceOpen(_Outptr_ WDC_DEVICE_HANDLE *phDev, _In_ const WD_CARD *pDeviceInfo, _In_ const PVOID pDevCtx)
Allocates and initializes a WDC ISA device structure, registers the device with WinDriver,...
DWORD DLLCALLCONV WDC_PciWriteCfg8(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwOffset, _In_ BYTE bVal)
Writes 1 byte (8 bits) to a specified offset in a PCI device's configuration space or a PCI Express d...
DWORD DLLCALLCONV WDC_Sleep(_In_ DWORD dwMicroSecs, _In_ WDC_SLEEP_OPTIONS options)
Delays execution for the specified duration of time (in microseconds).
DWORD DLLCALLCONV WDC_IntEnable(_In_ WDC_DEVICE_HANDLE hDev, _In_ WD_TRANSFER *pTransCmds, _In_ DWORD dwNumCmds, _In_ DWORD dwOptions, _In_ INT_HANDLER funcIntHandler, _In_ PVOID pData, _In_ BOOL fUseKP)
Enables interrupt handling for the device.
DWORD DLLCALLCONV WDC_DMATransactionUninit(_In_ WD_DMA *pDma)
Unlocks and frees the memory allocated for a DMA buffer transaction by a previous call to WDC_DMATran...
DWORD DLLCALLCONV WDC_PlatformDeviceOpen(_Outptr_ WDC_DEVICE_HANDLE *phDev, _In_ const WD_PLATFORM_CARD_INFO *pDeviceInfo, _In_ const PVOID pDevCtx)
Allocates and initializes a WDC platform device structure, registers the device with WinDriver,...
DWORD DLLCALLCONV WDC_PciReadCfgBySlot64(_In_ WD_PCI_SLOT *pPciSlot, _In_ DWORD dwOffset, _Outptr_ UINT64 *pqwVal)
Reads 8 bytes (64 bits) from a specified offset in a PCI device's configuration space or a PCI Expres...
DWORD DLLCALLCONV WDC_PciScanDevices(_In_ DWORD dwVendorId, _In_ DWORD dwDeviceId, _Outptr_ WDC_PCI_SCAN_RESULT *pPciScanResult)
Scans the PCI bus for all devices with the specified vendor and device ID combination and returns inf...
DWORD DLLCALLCONV WDC_DMASyncIo(_In_ WD_DMA *pDma)
Synchronizes the I/O caches with the DMA buffer, by flushing the data from the I/O caches and updatin...
DWORD WDC_DRV_OPEN_OPTIONS
Definition: wdc_lib.h:91
DWORD WDC_CardCleanupSetup(_In_ WDC_DEVICE_HANDLE hDev, _In_ WD_TRANSFER *pTransCmds, _In_ DWORD dwCmds, _In_ BOOL fForceCleanup)
Sets a list of transfer cleanup commands to be performed for the specified card on any of the followi...
DWORD DLLCALLCONV WDC_PciReadCfgBySlot16(_In_ WD_PCI_SLOT *pPciSlot, _In_ DWORD dwOffset, _Outptr_ WORD *pwVal)
Reads 2 bytes (16 bits) from a specified offset in a PCI device's configuration space or a PCI Expres...
void DLLCALLCONV WDC_Trace(const CHAR *format,...)
Displays debug trace messages according to the WDC debug options.
DWORD DLLCALLCONV WDC_MultiTransfer(_In_ WD_TRANSFER *pTransCmds, _In_ DWORD dwNumTrans)
Performs a group of memory and/or I/O read/write transfers.
DWORD DLLCALLCONV WDC_PciSriovDisable(_In_ WDC_DEVICE_HANDLE hDev)
Disables SR-IOV for a supported device and removes all the assigned VFs.
void DLLCALLCONV WDC_Err(const CHAR *format,...)
Displays debug error messages according to the WDC debug options.
DWORD DLLCALLCONV WDC_WriteAddrByAddrDesc32(_In_ struct WDC_ADDR_DESC *pAddrDesc, _In_ KPTR dwOffset, _In_ UINT32 dwVal)
Writes 4 byte (32 bits) to a specified memory or I/O address.
DWORD DLLCALLCONV WDC_ReadAddrByAddrDesc16(_In_ struct WDC_ADDR_DESC *pAddrDesc, _In_ KPTR dwOffset, _In_ WORD *pwVal)
Reads 2 byte (16 bits) from a specified memory or I/O address.
DWORD DLLCALLCONV WDC_PciResetDevice(_In_ WDC_DEVICE_HANDLE hDev)
Reset the PCI function without affecting other functions on the device.
DWORD DLLCALLCONV WDC_WriteAddr16(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _In_ WORD wVal)
writes 2 byte (16 bits) to a specified memory or I/O address.
DWORD DLLCALLCONV WDC_PciGetHeaderType(_In_ WDC_DEVICE_HANDLE hDev, _Outptr_ WDC_PCI_HEADER_TYPE *pHeaderType)
Retrieves the PCI device's configuration space header type.
DWORD DLLCALLCONV WDC_DMATransactionSGInit(_In_ WDC_DEVICE_HANDLE hDev, _In_ PVOID pBuf, _In_ DWORD dwOptions, _In_ DWORD dwDMABufSize, _Outptr_ WD_DMA **ppDma, _In_ WDC_INTERRUPT_PARAMS *pInterruptParams, _In_ DWORD dwMaxTransferSize, _In_ DWORD dwTransferElementSize)
Initializes the transaction and locks a pre-allocated user-mode memory buffer for DMA.
DWORD DLLCALLCONV WDC_IsaDeviceClose(_In_ WDC_DEVICE_HANDLE hDev)
Uninitializes a WDC ISA device structure and frees the memory allocated for it.
DWORD DLLCALLCONV WDC_SetDebugOptions(_In_ WDC_DBG_OPTIONS dbgOptions, _In_ const CHAR *pcDbgFile)
Sets debug options for the WDC library - see the description of WDC_DBG_OPTIONS for details regarding...
WDC_ADDR_MODE
Definition: wdc_lib.h:160
@ WDC_MODE_64
Definition: wdc_lib.h:164
@ WDC_MODE_32
Definition: wdc_lib.h:163
@ WDC_MODE_8
Definition: wdc_lib.h:161
@ WDC_MODE_16
Definition: wdc_lib.h:162
DWORD DLLCALLCONV WDC_PciGetExpressOffset(_In_ WDC_DEVICE_HANDLE hDev, _Outptr_ DWORD *pdwOffset)
Retrieves the PCI Express configuration registers' offset in the device's configuration space.
DWORD DLLCALLCONV WDC_ReadAddrByAddrDesc8(_In_ struct WDC_ADDR_DESC *pAddrDesc, _In_ KPTR dwOffset, _In_ BYTE *pbVal)
Reads 1 byte (8 bits) from a specified memory or I/O address.
DWORD DLLCALLCONV WDC_DMATransactionRelease(_In_ WD_DMA *pDma)
Terminates a specified DMA transaction without deleting the associated WD_DMA transaction structure.
WDC_DIRECTION
Definition: wdc_lib.h:139
@ WDC_READ_WRITE
Definition: wdc_lib.h:142
@ WDC_READ
Definition: wdc_lib.h:141
@ WDC_WRITE
Definition: wdc_lib.h:140
DWORD DLLCALLCONV WDC_DMATransactionExecute(_Inout_ WD_DMA *pDma, _In_ DMA_TRANSACTION_CALLBACK funcDMATransactionCallback, _In_ PVOID DMATransactionCallbackCtx)
Begins the execution of a specified DMA transaction.
DWORD DLLCALLCONV WDC_PciDeviceOpen(_Outptr_ WDC_DEVICE_HANDLE *phDev, _In_ const WD_PCI_CARD_INFO *pDeviceInfo, _In_ const PVOID pDevCtx)
Allocates and initializes a WDC PCI device structure, registers the device with WinDriver,...
DWORD DLLCALLCONV WDC_DMASyncCpu(_In_ WD_DMA *pDma)
Synchronizes the cache of all CPUs with the DMA buffer, by flushing the data from the CPU caches.
DWORD DLLCALLCONV WDC_PciWriteCfg64(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwOffset, _In_ UINT64 qwVal)
Writes 8 bytes (64 bits) to a specified offset in a PCI device's configuration space or a PCI Express...
DWORD DLLCALLCONV WDC_PciWriteCfgBySlot64(_In_ WD_PCI_SLOT *pPciSlot, _In_ DWORD dwOffset, _In_ UINT64 qwVal)
writes 8 bytes (64 bits) to a specified offset in a PCI device's configuration space or a PCI Express...
PVOID DLLCALLCONV WDC_GetDevContext(_In_ WDC_DEVICE_HANDLE hDev)
Returns the device's user context information.
DWORD DLLCALLCONV WDC_ReadAddr8(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _Outptr_ BYTE *pbVal)
Read/write a device's address space (8/16/32/64 bits)
DWORD DLLCALLCONV WDC_CallKerPlug(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwMsg, _Inout_ PVOID pData, _Outptr_ PDWORD pdwResult)
Sends a message from a user-mode application to a Kernel PlugIn driver.
DWORD DLLCALLCONV WDC_PciSriovGetNumVFs(_In_ WDC_DEVICE_HANDLE hDev, _Outptr_ DWORD *pdwNumVFs)
Gets the number of virtual functions assigned to a supported device.
DWORD DLLCALLCONV WDC_DriverClose(void)
Closes the WDC WinDriver handle (acquired and stored by a previous call to WDC_DriverOpen()) and unin...
DWORD DLLCALLCONV WDC_PciReadCfg(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwOffset, _Outptr_ PVOID pData, _In_ DWORD dwBytes)
Identify device by handle.
DWORD DLLCALLCONV WDC_DMATransactionContigInit(_In_ WDC_DEVICE_HANDLE hDev, _Outptr_ PVOID *ppBuf, _In_ DWORD dwOptions, _In_ DWORD dwDMABufSize, _Outptr_ WD_DMA **ppDma, _In_ WDC_INTERRUPT_PARAMS *pInterruptParams, _In_ DWORD dwAlignment)
Initializes the transaction, allocates a contiguous DMA buffer, locks it in physical memory,...
DWORD DLLCALLCONV WDC_DMABufUnlock(_In_ WD_DMA *pDma)
Unlocks and frees the memory allocated for a DMA buffer by a previous call to WDC_DMAContigBufLock(),...
DWORD DLLCALLCONV WDC_PciWriteCfgBySlot(_In_ WD_PCI_SLOT *pPciSlot, _In_ DWORD dwOffset, _In_ PVOID pData, _In_ DWORD dwBytes)
Write data to a specified offset in a PCI device's configuration space or a PCI Express device's exte...
#define WDC_SIZE_16
Definition: wdc_lib.h:155
BOOL DLLCALLCONV WDC_IntIsEnabled(_In_ WDC_DEVICE_HANDLE hDev)
Checks if a device's interrupts are currently enabled.
DWORD DLLCALLCONV WDC_PciGetExpressGen(_In_ WDC_DEVICE_HANDLE hDev)
Retrieves the PCI Express generation of a device.
DWORD DLLCALLCONV WDC_ReadAddrByAddrDesc64(_In_ struct WDC_ADDR_DESC *pAddrDesc, _In_ KPTR dwOffset, _In_ UINT64 *pqwVal)
Reads 8 byte (64 bits) from a specified memory or I/O address.
DWORD DLLCALLCONV WDC_PciDeviceClose(_In_ WDC_DEVICE_HANDLE hDev)
Uninitializes a WDC PCI device structure and frees the memory allocated for it.
const CHAR *DLLCALLCONV WDC_IntType2Str(_In_ DWORD dwIntType)
Converts interrupt type to string.
DWORD DLLCALLCONV WDC_WriteAddr32(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _In_ UINT32 dwVal)
writes 4 byte (32 bits) to a specified memory or I/O address.
DWORD DLLCALLCONV WDC_EventRegister(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwActions, _In_ EVENT_HANDLER funcEventHandler, _In_ PVOID pData, _In_ BOOL fUseKP)
Registers the application to receive Plug-and-Play and power management events notifications for the ...
DWORD DLLCALLCONV WDC_ReadAddrBlock(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _In_ UINT64 u64Bytes, _Outptr_ PVOID pData, _In_ WDC_ADDR_MODE mode, _In_ WDC_ADDR_RW_OPTIONS options)
Reads a block of data from the device.
DWORD DLLCALLCONV WDC_WriteAddrByAddrDesc8(_In_ struct WDC_ADDR_DESC *pAddrDesc, _In_ KPTR dwOffset, _In_ BYTE bVal)
Writes 1 byte (8 bits) to a specified memory or I/O address.
HANDLE DLLCALLCONV WDC_GetWDHandle(void)
Get a handle to WinDriver.
DWORD WDC_ADDR_SIZE
Definition: wdc_lib.h:158
DWORD DLLCALLCONV WDC_DMABufGet(_In_ DWORD hDma, _Outptr_ WD_DMA **ppDma)
Retrieves a contiguous DMA buffer which was allocated by another process.
DWORD DLLCALLCONV WDC_IntDisable(_In_ WDC_DEVICE_HANDLE hDev)
Disables interrupt interrupt handling for the device, pursuant to a previous call to WDC_IntEnable()
DWORD DLLCALLCONV WDC_PciScanCaps(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwCapId, _Outptr_ WDC_PCI_SCAN_CAPS_RESULT *pScanCapsResult)
Scans the basic PCI capabilities of the given device for the specified capability (or for all capabil...
DWORD DLLCALLCONV WDC_PciReadCfg16(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwOffset, _Outptr_ WORD *pwVal)
Reads 2 bytes (16 bits) from a specified offset in a PCI device's configuration space or a PCI Expres...
BOOL DLLCALLCONV WDC_AddrSpaceIsActive(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwAddrSpace)
Checks if the specified memory or I/O address space is active ,i.e., if its size is not zero.
DWORD DLLCALLCONV WDC_PciWriteCfgBySlot16(_In_ WD_PCI_SLOT *pPciSlot, _In_ DWORD dwOffset, _In_ WORD wVal)
writes 2 bytes (16 bits) to a specified offset in a PCI device's configuration space or a PCI Express...
DWORD DLLCALLCONV WDC_KernelPlugInOpen(_In_ WDC_DEVICE_HANDLE hDev, _In_ const CHAR *pcKPDriverName, _In_ PVOID pKPOpenData)
Opens a handle to a Kernel PlugIn driver.
DWORD DLLCALLCONV WDC_WriteAddrBlock(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _In_ UINT64 u64Bytes, _In_ PVOID pData, _In_ WDC_ADDR_MODE mode, _In_ WDC_ADDR_RW_OPTIONS options)
Writes a block of data to the device.
DWORD DLLCALLCONV WDC_PciGetDeviceInfo(_Inout_ WD_PCI_CARD_INFO *pDeviceInfo)
Retrieves a PCI device's resources information (memory and I/O ranges and interrupt information).
#define WDC_SIZE_8
Definition: wdc_lib.h:154
DWORD DLLCALLCONV WDC_DMAContigBufLock(_In_ WDC_DEVICE_HANDLE hDev, _Outptr_ PVOID *ppBuf, _In_ DWORD dwOptions, _In_ DWORD dwDMABufSize, _Outptr_ WD_DMA **ppDma)
Allocates a contiguous DMA buffer, locks it in physical memory, and returns mappings of the allocated...
DWORD DLLCALLCONV WDC_PciReadCfg8(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwOffset, _Outptr_ BYTE *pbVal)
Read/write 8/16/32/64 bits from the PCI configuration space.
DWORD DLLCALLCONV WDC_PciReadCfg64(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwOffset, _Outptr_ UINT64 *pqwVal)
Reads 8 bytes (64 bits) from a specified offset in a PCI device's configuration space or a PCI Expres...
DWORD DLLCALLCONV WDC_ReadAddr16(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _Outptr_ WORD *pwVal)
reads 2 byte (16 bits) from a specified memory or I/O address.
DWORD DLLCALLCONV WDC_DMATransferCompletedAndCheck(_Inout_ WD_DMA *pDma, _In_ BOOL fRunCallback)
Notifies WinDriver that a device's DMA transfer operation is completed.
DWORD DLLCALLCONV WDC_PciScanRegisteredDevices(_In_ DWORD dwVendorId, _In_ DWORD dwDeviceId, _Outptr_ WDC_PCI_SCAN_RESULT *pPciScanResult)
Scans the PCI bus for all devices with the specified vendor and device ID combination that have been ...
DWORD DLLCALLCONV WDC_PciGetExpressGenBySlot(_In_ WD_PCI_SLOT *pPciSlot)
Retrieves the PCI Express generation of a device.
DWORD DLLCALLCONV WDC_PciReadCfg32(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwOffset, _Outptr_ UINT32 *pdwVal)
Reads 4 bytes (32 bits) from a specified offset in a PCI device's configuration space or a PCI Expres...
DWORD DLLCALLCONV WDC_PlatformScanDevices(_In_ const CHAR *pcDeviceName, _In_ PHYS_ADDR pSearchAddr, _Outptr_ WDC_PLATFORM_SCAN_RESULT *pPlatformScanResult)
Scans the platform for devices matching a specific device name.
DWORD DLLCALLCONV WDC_ReadAddrByAddrDesc32(_In_ struct WDC_ADDR_DESC *pAddrDesc, _In_ KPTR dwOffset, _In_ UINT32 *pdwVal)
Reads 4 byte (32 bits) from a specified memory or I/O address.
DWORD DLLCALLCONV WDC_Version(_Outptr_ CHAR *pcVersion, _In_ DWORD dwLen, _Outptr_ DWORD *pdwVersion)
Returns the version number of the WinDriver kernel module used by the WDC library.
DWORD DLLCALLCONV WDC_PciWriteCfgBySlot8(_In_ WD_PCI_SLOT *pPciSlot, _In_ DWORD dwOffset, _In_ BYTE bVal)
writes 1 byte (8 bits) to a specified offset in a PCI device's configuration space or a PCI Express d...
WDC_ADDR_RW_OPTIONS
Read/write address options.
Definition: wdc_lib.h:146
@ WDC_ADDR_RW_DEFAULT
Default: memory resource - direct access; autoincrement on block transfers.
Definition: wdc_lib.h:147
@ WDC_ADDR_RW_NO_AUTOINC
Hold device address constant while reading/writing a block.
Definition: wdc_lib.h:149
DWORD DLLCALLCONV WDC_PciReadCfgBySlot32(_In_ WD_PCI_SLOT *pPciSlot, _In_ DWORD dwOffset, _Outptr_ UINT32 *pdwVal)
Reads 4 bytes (32 bits) from a specified offset in a PCI device's configuration space or a PCI Expres...
#define WDC_SIZE_32
Definition: wdc_lib.h:156
WD_BUS_TYPE DLLCALLCONV WDC_GetBusType(_In_ WDC_DEVICE_HANDLE hDev)
Returns the device's bus type: WD_BUS_PCI, WD_BUS_ISA or WD_BUS_UNKNOWN.
DWORD DLLCALLCONV WDC_ScanDevices(_In_ DWORD dwVendorId, _In_ DWORD dwDeviceId, _Outptr_ WDC_PCI_SCAN_RESULT *pPciScanResult, _In_ const CHAR *pcDeviceName, _In_ PHYS_ADDR pSearchAddr, _Outptr_ WDC_PLATFORM_SCAN_RESULT *pPlatformScanResult)
A comprehensive scan function that can search for either PCI devices (by ID) or platform devices (by ...
DWORD DLLCALLCONV WDC_WriteAddr8(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _In_ BYTE bVal)
writes 1 byte (8 bits) to a specified memory or I/O address.
DWORD DLLCALLCONV WDC_PlatformGetDeviceInfo(_Inout_ WD_PLATFORM_CARD_INFO *pDeviceInfo)
Retrieves platform-specific device information for a non-PCI or custom bus device.
DWORD DLLCALLCONV WDC_ReadAddr32(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _Outptr_ UINT32 *pdwVal)
reads 4 byte (32 bits) from a specified memory or I/O address.
DWORD DLLCALLCONV WDC_PciReadCfgBySlot8(_In_ WD_PCI_SLOT *pPciSlot, _In_ DWORD dwOffset, _Outptr_ BYTE *pbVal)
Read/write 8/16/32/64 bits from the PCI configuration space.
DWORD DLLCALLCONV WDC_PciSriovEnable(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwNumVFs)
SR-IOV API functions are not part of the standard WinDriver API, and not included in the standard ver...
DWORD DLLCALLCONV WDC_PciScanDevicesByTopology(_In_ DWORD dwVendorId, _In_ DWORD dwDeviceId, _Outptr_ WDC_PCI_SCAN_RESULT *pPciScanResult)
Scans the PCI bus for all devices with the specified vendor and device ID combination and returns inf...
DWORD DLLCALLCONV WDC_WriteAddrByAddrDesc64(_In_ struct WDC_ADDR_DESC *pAddrDesc, _In_ KPTR dwOffset, _In_ UINT64 qwVal)
Writes 8 byte (64 bits) to a specified memory or I/O address.
DWORD WDC_DBG_OPTIONS
Definition: wdc_lib.h:126
DWORD DLLCALLCONV WDC_WriteAddr64(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _In_ UINT64 qwVal)
writes 8 byte (64 bits) to a specified memory or I/O address.
DWORD DLLCALLCONV WDC_DeviceOpen(_Outptr_ WDC_DEVICE_HANDLE *phDev, _In_ const WD_PCI_CARD_INFO *pPciDeviceInfo, _In_ const WD_PLATFORM_CARD_INFO *pPlatformDeviceInfo, _In_ const PVOID pDevCtx)
A versatile function that opens a handle for either a PCI device, a platform device.
DWORD DLLCALLCONV WDC_PciWriteCfg(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwOffset, _In_ PVOID pData, _In_ DWORD dwBytes)
Writes data to a specified offset in a PCI device's configuration space or a PCI Express device's ext...
DWORD DLLCALLCONV WDC_PciWriteCfgBySlot32(_In_ WD_PCI_SLOT *pPciSlot, _In_ DWORD dwOffset, _In_ UINT32 dwVal)
writes 4 bytes (32 bits) to a specified offset in a PCI device's configuration space or a PCI Express...
DWORD DLLCALLCONV WDC_PciWriteCfg32(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwOffset, _In_ UINT32 dwVal)
Writes 4 bytes (32 bits) to a specified offset in a PCI device's configuration space or a PCI Express...
DWORD DLLCALLCONV WDC_ReadAddr64(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwAddrSpace, _In_ KPTR dwOffset, _Outptr_ UINT64 *pqwVal)
reads 8 byte (64 bits) from a specified memory or I/O address.
BOOL DLLCALLCONV WDC_EventIsRegistered(_In_ WDC_DEVICE_HANDLE hDev)
Checks if the application is currently registered to receive Plug-and-Play and power management notif...
DWORD DLLCALLCONV WDC_PciReadCfgBySlot(_In_ WD_PCI_SLOT *pPciSlot, _In_ DWORD dwOffset, _Outptr_ PVOID pData, _In_ DWORD dwBytes)
Read/write a block of any length from the PCI configuration space.
DWORD DLLCALLCONV WDC_EventUnregister(_In_ WDC_DEVICE_HANDLE hDev)
Unregisters an application from a receiving Plug-and-Play and power management notifications for a de...
DWORD DLLCALLCONV WDC_PciScanCapsBySlot(_In_ WD_PCI_SLOT *pPciSlot, _In_ DWORD dwCapId, _Outptr_ WDC_PCI_SCAN_CAPS_RESULT *pScanCapsResult)
Scans the basic PCI capabilities of the given device for the specified capability (or for all capabil...
DWORD DLLCALLCONV WDC_PciWriteCfg16(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwOffset, _In_ WORD wVal)
Writes 2 bytes (16 bits) to a specified offset in a PCI device's configuration space or a PCI Express...
DWORD DLLCALLCONV WDC_PciScanExtCaps(_In_ WDC_DEVICE_HANDLE hDev, _In_ DWORD dwCapId, _Outptr_ WDC_PCI_SCAN_CAPS_RESULT *pScanCapsResult)
Scans the extended (PCI Express) PCI capabilities of the given device for the specified capability (o...
DWORD DLLCALLCONV WDC_DriverOpen(_In_ WDC_DRV_OPEN_OPTIONS openOptions, _In_ const CHAR *pcLicense)
Opens and stores a handle to WinDriver's kernel module and initializes the WDC library according to t...
void * WDC_DEVICE_HANDLE
Handle to device information struct.
Definition: wdc_lib.h:33
#define _Inout_
Definition: windrvr.h:38
unsigned short int WORD
Definition: windrvr.h:337
@ WD_DEVICE_NAME_LENGTH
Definition: windrvr.h:913
unsigned char BYTE
Definition: windrvr.h:336
#define _Outptr_
Definition: windrvr.h:40
DWORD WD_BUS_TYPE
Definition: windrvr.h:716
UINT64 PHYS_ADDR
Definition: windrvr.h:391
void(DLLCALLCONV * DMA_TRANSACTION_CALLBACK)(PVOID pData)
Definition: windrvr.h:544
#define _In_
Definition: windrvr.h:37
unsigned __int64 UINT64
Definition: windrvr.h:318
@ WD_PLATFORM_CARDS
Definition: windrvr.h:912
@ WD_PCI_MAX_CAPS
Definition: windrvr.h:936
#define DLLCALLCONV
Definition: windrvr.h:32
@ WD_PCI_CARDS
Definition: windrvr.h:879
unsigned int UINT32
Definition: windrvr.h:341
UINT32 KPTR
Definition: windrvr.h:381
void(* EVENT_HANDLER)(WD_EVENT *pEvent, void *pData)
void(DLLCALLCONV * INT_HANDLER)(PVOID pData)