
PCI CD and PCI CDa
Document Number: 008-00965-06 EDT Public Revision: I December 2004
Template: edt.dot
Page 23
Syntax
#include "edtinc.h"
void *edt_wait_buffers(EdtDev *edt_p, int count);
Arguments
edt_p
device handle returned from edt_open or edt_open_channel
count
How many buffers to block for. Completed buffers are numbered relatively;
start each call with 1.
Return
Address of last completed buffer on success; NULL on error. If an error occurs, call edt_perror() to get
the system error message.
Note
If using timeouts, call edt_timeouts after edt_wait_for_buffers returns to see if the number of
timeouts has incremented. If it has incremented, call edt_get_timeout_count to get the
number of bytes transferred into the buffer. DMA does not automatically continue on to the
next buffer, so you need to call edt_start_buffers to move on to the next buffer in the ring.
Note
If the ring buffer is in free-running mode and the application cannot process data as fast as it
is acquired, DMA will wrap around and overwrite the referenced buffer. The application must
ensure that the data in the buffer is processed or copied out in time to prevent overrun.
edt_wait_for_next_buffer
Description
Waits for the next buffer that finishes DMA. Depending on how often this routine is called, buffers that
have already completed DMA might be skipped.
Syntax
#include "edtinc.h"
void *edt_wait_for_next_buffer(EdtDev *edt_p) ;
Arguments
edt_p
device handle returned from edt_open or edt_open_channel.
Return
Returns a pointer to the buffer, or NULL on failure. If an error occurs, call edt_perror() to get the
system error message.
edt_wait_buffers_timed
Description
Blocks until the specified number of buffers have completed with a pointer to the time the last buffer
finished.
Syntax
#include "edtinc.h"
void *edt_wait_buffers_timed (EdtDev *edt_p, int count, uint *timep);
Comentarios a estos manuales