12 _7300_alloc_dma_mem – ADLINK PCIe-7300A User Manual

Page 86

Advertising
background image

76

C/C++

Libraries

5.12 _7300_Alloc_DMA_Mem

@ Description

Contact Windows 95 system to allocate a memory for DMA trans-
fer. This function is only available in Windows 95 version.

@ Syntax

Visual C/C++ (Windows 95)

int W_7300_Alloc_DMA_Mem (U32 buf_size, HANDLE

*memID, U32 *linearAddr)

Visual Basic (Windows 95)

W_7300_Alloc_DMA_Mem (ByVal buf_size As Long,

memID As Long, linearAddr As Long) As Long

@ Argument

buf_size

:Bytes to allocate. Please be careful, the unit of this

argument is BYTE, not SAMPLE.

memID

:If the memory allocation is successful, driver returns the ID

of that memory in this argument. Use this memory ID in
W_7300_DI_DMA_Start or W_7300_DO_DMA_Start function call.

linearAddr

:The linear address of the allocated DMA memory.

You can use this linear address as a pointer in C/C++ to access
(read/write) the DMA data.

@ Return Code

NoError

AllocDMAMemFailed

Advertising