EVT_WDF_PROGRAM_DMA callback function (wdfdmatransaction.h)

[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(
  [in] WDFDMATRANSACTION Transaction,
  [in] WDFDEVICE Device,
  [in] WDFCONTEXT Context,
  [in] WDF_DMA_DIRECTION Direction,
  [in] PSCATTER_GATHER_LIST SgList
)
{...}

Parameters

[in] Transaction

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

[in] Device

A handle to a framework device object.

[in] Context

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

[in] Direction

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

[in] 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

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

See also

WdfDmaTransactionExecute

WdfDmaTransactionInitialize

WdfDmaTransactionInitializeUsingRequest