Jungo WinDriver
Official Documentation
|
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.
[in] | hDev | Handle to a WDC device, returned by WDC_xxxDeviceOpen() |
[in] | pBuf | Pointer to a user-mode buffer to be mapped to the allocated physical DMA buffer(s). |
[in] | dwOptions | A bit mask of any of the following flags (defined in an enumeration in windrvr.h): DMA_FROM_DEVICE: Synchronize the DMA buffer for transfers from the device to memory. DMA_TO_DEVICE: Synchronize the DMA buffer for transfers from memory to the device. DMA_TO_FROM_DEVICE: Synchronize the DMA buffer for transfers in both directions i.e., from the device to memory and from memory to the device (<=> DMA_FROM_DEVICE | DMA_TO_DEVICE). DMA_ALLOW_CACHE: Allow caching of the memory. DMA_ALLOW_64BIT_ADDRESS: Allow allocation of 64-bit DMA addresses. |
[in] | dwDMABufSize | The size (in bytes) of the DMA buffer. |
[out] | ppDma | Pointer to a pointer to a DMA buffer information structure, which is allocated by the function. The pointer to this structure (*ppDma) should be passed to WDC_DMATransactionUninit() when the DMA buffer is no longer needed. |
[in] | pInterruptParams | WDC_DMATransactionSGInit() invokes WDC_IntEnable() with the relevant parameters from the structure (WDC_INTERRUPT_PARAMS). No action will be taken if this parameter is NULL. |
[in] | dwMaxTransferSize | The maximum size for each of the transfers. |
[in] | dwTransferElementSize | The size (in bytes) of the DMA transfer element (descriptor). |
For more detailed usage of the WDC_DMA Transactions functions, please refer to 11.3. Performing Direct Memory Access (DMA) transactions