FIFO Flushing
[EDT DMA Library]


Detailed Description

First-in, first-out (FIFO) memory buffers are used to smooth data transmission between different types of data sinks internal to EDT boards.

For instance, the FIFO stores information processed by the user interface Xilinx until the PCI Xilinx retrieves it across the PCI bus. The PCI bus normally sends information in bursts, so the FIFO allows this same information to be sent smoothly. When acquiring or sending data, flush the FIFO immediately before performing DMA. This also resets the FIFO to an empty state. The following subroutines either flush the FIFO or set it to flush automatically at the start of DMA.


Functions

void edt_flush_fifo (EdtDev *edt_p)
 Flushes the board's input and output FIFOs, to allow new data transfers to start from a known state.
int edt_get_firstflush (EdtDev *edt_p)
 OBSOLETE.
int edt_set_firstflush (EdtDev *edt_p, int val)
 Tells whether and when to flush the FIFOs before DMA transfer.


Function Documentation

void edt_flush_fifo ( EdtDev edt_p  ) 

Flushes the board's input and output FIFOs, to allow new data transfers to start from a known state.

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel

Definition at line 4016 of file libedt.c.

int edt_get_firstflush ( EdtDev edt_p  ) 

OBSOLETE.

Returns the value set by edt_set_firstflush(). This is an obsolete function that was only used as a kludge to detect EDT_ACT_KBS (also obsolete).

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel
Example
 int application_should_already_know_this;
 application_should_already_know_this=edt_get_firstflush(edt_p);

Returns:
The value set by edt_set_firstflush().
See also:
edt_set_firstflush

Definition at line 5116 of file libedt.c.

int edt_set_firstflush ( EdtDev edt_p,
int  flag 
)

Tells whether and when to flush the FIFOs before DMA transfer.

By default, the FIFOs are not flushed. However, certain applications may require flushing before a given DMA transfer, or before each transfer.

Parameters:
edt_p pointer to edt device structure returned by edt_open or edt_open_channel
flag Tells whether and when to flush the FIFOs. Valid values are:
  • EDT_ACT_NEVER don't flush before DMA transfer (default)
  • EDT_ACT_ONCE flush before the start of the next DMA transfer
  • EDT_ACT_ALWAYS flush before the start of every DMA transfer
Returns:
0 on success; -1 on error. If an error occurs, call edt_perror to get the system error message.

Definition at line 5086 of file libedt.c.


Generated on Mon May 12 16:39:07 2008 by  doxygen 1.5.1