Share via


DMAIssueTransfer (Windows Embedded CE 6.0)

1/6/2010

This function sets up map descriptor registers for a channel to map a DMA transfer from a locked-down buffer. If there are other DMA transfers queued in the DMA channel this transfer is queued as well.

Syntax

BOOL DMAIssueTransfer(
  HANDLE hDmaChannel,
  PDMA_TRANSFER_HANDLE phDmaHandle,
  DWORD dwFlags,
  PHYSICAL_ADDRESS SysytemMemoryPhysicalAddress,
  PVOID CurrentVa,
  ULONG Length,
  HANDLE hNotifyHandle,
  PVOID Context1,
  PVOID Context2,
  PHYSICAL_ADDRESS phOpDeviceIoAddress
);

Parameters

  • hDmaChannel
    [in] Handle to an allocated DMA Channel
  • phDmaHandle
    [in, out] When DMAIssueTransfer returns TRUE, for success, term is a pointer to a DMA_TRANSFER_HANDLE.
  • dwFlags
    [in] Global DMA transfer flag. This flag is used to determine what kind of transfer the device wants.

    The following table shows the possible flags.

    Value Description

    DMA_FLAGS_WRITE_TO_DEVICE

    Set for write operation.

    DMA_FLAGS_INC_DEVICE_ADDRESS

    Indicates the operation requires incrementing the source and destination address. This flag can be used to accomplish memory to memory DMA transfers.

    DMA_FLAGS_RESET_DEVICE_ADDRESS

    Resets device address to the original value used by DMAAllocateChannel. The device address can be changed when a DMA transfer with the flag DMA_FLAGS_INC_DEVICE_ADDRESS executes.

    DMA_FLAGS_USER_OPTIONAL_DEVICE

    Sets the DMA transfer to automatically reload until it is explicitly canceled.

    DMA_FLAGS_NOT_AUTO_START

    Indicates the transfer is queued to hardware until a call to DMAStartTransfer.

  • SystemMemoryPhysicalAddress
    [in] Common System Physical Buffer address. This address is obtained from HalAllocateCommonBuffer.
  • CurrentVa
    [in] Virtual Address to SystemMemoryPhysicalAddress. This value is obtained from HalAllocateCommonBuffer.
  • Length
    [in] Specifies the length, in bytes, to be transferred. This value must be less than or equal to the MaximunSizeOfEachTransfer value contained in the CE_DMA_ADAPTER structure. This value is returned by DMAGetAdapter. If the value is not less than or equal to the MaximunSizeOfEachTransfer, then the transfer fails.
  • hNotifyHandle
    [in] Event Handle used when SetEvent is called after the DMA transfer finishes. If this handle is NULL then no call to SetEvent is made when the transfer is finished.
  • Context1
    [in] Context1 allows a User to attach content to the DMA transfer. The content is retrieved using DMAGetContexts and a valid DMA Handle.
  • Context2
    [in] Context2 allows a User to attach content to the DMA transfer. The content is retrieved using DMAGetContexts and a valid DMA Handle.
  • phOpDeviceIoAddress
    [in] Optional Device Io Address for this DMA transfer. This parameter is only used when DMA_FLAGS_USER_OPTIONAL_DEVICE_ADDRESS is set. The phDeviceIoAddress, provided by DMAAllocateChannel, is ignored when DMA_FLAGS_USER_OPTIONAL_DEVICE_ADDRESS is set.

Return Value

Returns TRUE on success. The associated DMA handle for the DMA Transfer is returned through phDmaHandle.

Remarks

DMAIssueTransfer enables DMA hardware to start this driver when the DMA Channel is free. When a DMA Channel is not free, the DMA transfer is queued until the DMA Channel is free again.

Requirements

Header oaldma.h
Library CEDDK.lib
Windows Embedded CE Windows Embedded CE 6.0 and later

See Also

Reference

CEDDK Dynamic-Link Library DMA Functions
CEDDK Dynamic-Link Library DMA Structures