EVT_WDF_PROGRAM_DMA callback function

[Applies to KMDF only]

A framework-based driver's EvtProgramDma event callback function programs a specified device to perform a DMA transfer operation.

Syntax

EVT_WDF_PROGRAM_DMA EvtWdfProgramDma;

BOOLEAN EvtWdfProgramDma(
  WDFDMATRANSACTION Transaction,
  WDFDEVICE Device,
  WDFCONTEXT Context,
  WDF_DMA_DIRECTION Direction,
  PSCATTER_GATHER_LIST SgList
)
{...}

Parameters

Transaction

A handle to the DMA transaction object that represents the current DMA transaction.

Device

A handle to a framework device object.

Context

The context pointer that the driver specified in a previous call to WdfDmaTransactionExecute.

Direction

A WDF_DMA_DIRECTION-typed value that specifies the direction of the DMA transfer operation.

SgList

A pointer to a SCATTER_GATHER_LIST structure.

Return value

The EvtProgramDma callback function must return TRUE if it successfully starts the DMA transfer operation. Otherwise, this callback function must return FALSE. However, the framework currently ignores the return value.

Remarks

Drivers register an EvtProgramDma event callback function by calling WdfDmaTransactionInitializeUsingRequest or WdfDmaTransactionInitialize.

The framework calls a driver's EvtProgramDma event callback function when a DMA transfer is available. The callback function must program the hardware to start the transfer.

The driver must not manipulate the data buffers associated with the transaction until after WdfDmaTransactionDmaCompletedXxx has returned TRUE.

For single packet transfers, the scatter/gather list that the SgList parameter points to contains a single element.

For more information about this callback function, see Programming DMA Hardware.

Requirements

   
Target Platform Universal
Minimum KMDF version 1.0
Header wdfdmatransaction.h (include Wdf.h)
IRQL DISPATCH_LEVEL

See also

WdfDmaTransactionExecute

WdfDmaTransactionInitialize

WdfDmaTransactionInitializeUsingRequest