Partager via


DMAIssueMultiBufferTransfer (Compact 2013)

3/26/2014

This function queues multiple DMA transfer requests. Much like DMAIssueTransfer, if there are no other DMA transfers queued in the DMA channel, this function sets up map descriptor registers for a channel to map the first DMA transfer from a locked-down buffer.

Syntax

BOOL DMAIssueMultiBufferTransfer (
  HANDLE hDmaChannel,
  PDMA_TRANSFER_HANDLE phDmaHandle,
  DWORD dwFlags,
  DWORD dwNumOfTransfer,
  CE_DMA_BUFFER_BLOCK pCeDmaBufferBlock[],
  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.

  • DwNumOfTransfer
    [in] Number of buffer block pointers contained in pCeDmaBufferBlock[].
  • pCeDmaBufferBlock[]
    [in] Array of pointers to memory blocks.
  • 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.

Requirements

Header

oaldma.h

Library

CEDDK.lib

See Also

Reference

Ceddk.dll DMA Functions
Ceddk.dll DMA Structures