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

int edt_disable_channel (EdtDev *edt_p, u_int channel)
 Clears a specified mezzanine channel enable bit.
int edt_disable_channels (EdtDev *edt_p, u_int mask)
 Clears specified mezzanine channel enable bits.
int edt_enable_channel (EdtDev *edt_p, u_int channel)
 Sets a specified mezzanine channel enable bit.
int edt_enable_channels (EdtDev *edt_p, u_int mask)
 Sets specified mezzanine channel enable bits.
void edt_flush_channel (EdtDev *edt_p, int channel)
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

int edt_disable_channel ( EdtDev edt_p,
u_int  channel 
)

Clears a specified mezzanine channel enable bit.

Parameters:
edt_p 
channel 
Returns:
0 on success, -1 on failure
This function disables a DMA channel specified by the second argument.

Definition at line 9378 of file libedt.c.

int edt_disable_channels ( EdtDev edt_p,
u_int  mask 
)

Clears specified mezzanine channel enable bits.

Parameters:
edt_p 
channel 
Returns:
0 on success, -1 on failure
This function disables DMA channels specified by the bitmask in second argument.

Definition at line 9309 of file libedt.c.

int edt_enable_channel ( EdtDev edt_p,
u_int  channel 
)

Sets a specified mezzanine channel enable bit.

Parameters:
edt_p 
channel 
Returns:
0 on success, -1 on failure
This function enables a DMA channel specified by the second argument.

Definition at line 9342 of file libedt.c.

int edt_enable_channels ( EdtDev edt_p,
u_int  mask 
)

Sets specified mezzanine channel enable bits.

Parameters:
edt_p 
channel 
Returns:
0 on success, -1 on failure
This function enables DMA channels specified by the bitmask in second argument.

Definition at line 9276 of file libedt.c.

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 4131 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 4799 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 4769 of file libedt.c.


Generated on 19 Jun 2015 by  doxygen 1.4.7