
PCI CD and PCI CDa
Document Number: 008-00965-06 EDT Public Revision: I December 2004
Template: edt.dot
Page 20
Return
The return value from read, normally the number of bytes read; –1 is returned in case of error. Call
edt_perror() to get the system error message.
Note
If using timeouts, call edt_timeouts after edt_read 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.
edt_write
Description
Perform a write on the EDT Product. For those on UNIX systems, the UNIX 2 GB file offset bug is
avoided during large amounts of input or output; that is, writing past 231 does not fail. This call is not
multibuffering, and no transfer is active when it completes.
Syntax
#include "edtinc.h"
int edt_write(EdtDev *edt_p, void *buf, int size);
Arguments
edt_p
device handle returned from edt_open or edt_open_channel
buf
address of buffer to write from
size
size of write in bytes
Return
The return value from write; –1 is returned in case of error. Call edt_perror() to get the system error
message.
Note
If using timeouts, call edt_timeouts after edt_write 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.
edt_start_buffers
Description
Starts DMA to the specified number of buffers. If you supply a number greater than the number of
buffers set up, DMA continues looping through the buffers until the total count has been satisfied.
Syntax
#include "edtinc.h"
int edt_start_buffers(EdtDev *edt_p, int bufnum);
Comentários a estes Manuais