Partager via


DMAOpenBuffer (Windows Embedded CE 6.0)

1/6/2010

This function is used to map a virtual buffer to a physical DMA block.

Syntax

DMA_BUFFER_HANDLE DMAOpenBuffer (
  PCE_DMA_ADAPTER pDmaAdapter,
  DWORD dwNumBuffer,
  PVOID pBufferArray[],
  DWORD aLength[],
);

Parameters

  • pDmaAdapter
    [in] Pointer to a CE_DMA_ADAPTER structure, which is either returned by the function DMAGetAdapter or is created by the caller for Bus Mastering DMA.
  • DwNumBuffer
    [in] Number of virtual buffers passed into DMAOpenBuffer.
  • pBufferArray[]
    [in] Pointer to an array of virtual addresses. This array is bounded by the value of the parameter dwNumBuffer.
  • aLength[]
    [in] Pointer to an array of lengths. This array is bounded by the value dwNumber.

Return Value

Returns a nonzero value on success. Returns zero on failure. For extended error information, the user driver can call GetLastError.

Remarks

The DMA_BUFFER_HANDLE returned by this function can be used with other DMA buffer functions. DMAOpenBuffer will allocate internal structures and create a DMA buffer block descriptor. If necessary, it will also call HalAllocateCommonBuffer.

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