
PCI CD and PCI CDa
Document Number: 008-00965-06 EDT Public Revision: I December 2004
Template: edt.dot
Page 29
edt_configure_block_buffers
Description
Similar to edt_configure_ring_buffers, except that it allocates the ring buffers as a single large block,
setting the ring buffer addresses from within that block. This allows reading or writing buffers from/to
a file in single chunks larger than the buffer size, which is sometimes considerable more efficient.
Buffer sizes are rounded up by PAGE_SIZE so that DMA occurs on a page boundary.
Syntax
int edt_configure_block_buffers(EdtDev *edt_p, int bufsize, int
numbufs, int write_flag, int header_size, int header_before)
Arguments
edt_p
device struct returned from edt_open
bufsize
size of the individual buffers
numbufs
number of buffers to create
write_flag
1, if these buffers are set up to go out; 0 otherwise
header_size
if non-zero, additional memory (header_size bytes) will be allocated for each
buffer for Header data. The loocation of this header space is determined by
the argument header_before.
header_before
if non-zero, the header space defined by header_size is placed before the
DMA buffer; otherwise, it comes after the DMA buffer. The value returned by
edt_wait_for_buffers is always the DMA buffer.
Return
0 on success, -1 on failure.
See Also
edt_configure_ring_buffers
edt_startdma_action
Description
Specifies when to perform the action at the start of a dma transfer as specified by edt_startdma_reg(). A
common use of this is to write to a register which signals an external device that dma has started, to
trigger the device to start sending. The default is no dma action. The PDV library uses this function to
send a trigger to a camera a the start of dma. This function allows the register write to occur in a critical
section with the start of dma and at the same time.
Syntax
void edt_startdma_action(EdtDev *edt_p, uint_t val);
Arguments
edt_p
device struct returned from edt_open
val
One of EDT_ACT_NEVER, EDT_ACT_ONCE, or EDT_ACT_ALWAYS
Example
edt_startdma_action(edt_p, EDT_ACT_ALWAYS);
edt_startdma_reg(edt_p, PDV_CMD, PDV_ENABLE_GRAB);
Kommentare zu diesen Handbüchern