Help: ICE_ICELIB_PIC_DMAXPTR

Returns pointer to buffer with the next available DMA data

Function PIC_DMAXPTR - Returns pointer to buffer with the next available DMA data

PIC	p	Handle to Device 
int	dmac	DMA Channel - usually returned from PIC_IOPORT
int	**buffer Pointer to pointer to transfer buffer
int	bytes   Number of bytes in transfer buffer
int	flags   Operational modifiers (FLG_NOWAIT=nonblocking)
int	PIC_DMAXPTR Number of bytes transferred 

This routine is similar to PIC_DMAXFER except that the actual transfer is left to the user.
It waits for the next transfer to be available and returns a pointer to the spot in the 
circular buffer where the data is located.

This routine returns the number of bytes ready to transfer, 0 if no data is available and
the FLG_NOWAIT is specified, -1 when the DMA function is completed, and -2 for an error.

Note: If FLG_NOWAIT is specified and the return status == 0 indicating no data available, 
the user should add a usleep of roughly one buffers length or 10 mSec, whichever is greater, 
for efficient use of the PCI bus.  Over-polling can cause data fall-behinds.

Note: If a timeout TO=N flag is specified in the open string, and no data is transfered 
within N seconds, the routine will return with status=0.