|
int | edt_close (EdtDev edt_p) |
| Shut down all pending I/O operations, closes the device or channel and frees all resources associated with the device handle. More...
|
|
EDT_CHECK_RETURN EdtDev | edt_open (const char *device_name, int unit) |
| Open the specified EDT board and sets up the device handle. Equivalent to edt_open_device(device_name, unit, channel: 0, verbose: 1) . More...
|
|
EDT_CHECK_RETURN EdtDev | edt_open_quiet (const char *device_name, int unit) |
| Same as edt_open(), but with fewer log messages. Equivalent to edt_open_device(device_name, unit, channel: 0, verbose: 0) . More...
|
|
EDT_CHECK_RETURN EdtDev | edt_open_channel (const char *device_name, int unit, int channel) |
| Open a specific DMA channel on the specified EDT board. Equivalent to edt_open_device(device_name, unit, channel, verbose: 1) . More...
|
|
EDT_CHECK_RETURN EdtDev | edt_open_device (const char *device_name, int unit, int channel, int verbose) |
| Open a specific EDT board and DMA channel. More...
|
|
void | edt_set_port (EdtDev edt_p, EdtIOPort port) |
| Set the port number, as distinct from the DMA channel. More...
|
|
EdtIOPort | edt_get_port (EdtDev edt_p) |
| Get the port number set by edt_set_port(). More...
|
|
int | edt_read (EdtDev edt_p, void *buf, unsigned int size) |
| Perform a DMA read from the EDT device. More...
|
|
int | edt_write (EdtDev edt_p, void *buf, unsigned int size) |
| Perform a DMA write to the EDT device. More...
|
|
int | edt_configure_ring_buffers (EdtDev edt_p, unsigned int bufsize, unsigned int numbufs, unsigned int write_flag) |
| Prepare and configure ring buffers for DMA to/from the EDT device. More...
|
|
int | edt_configure_block_buffers (EdtDev edt_p, int bufsize, int numbufs, int write_flag, int header_size, int header_before) |
| Prepare and configure ring buffers for DMA, allocating buffers as a single large block, setting the buffer addresses from within that block. More...
|
|
void | edt_set_dmy_wait_for_buffers_callback (EdtDev edt_p, void(*callback)(EdtDev edt_p, void *buf)) |
| Register a callback to populate the ring buffer with data when edt_wait_for_buffers() is called. More...
|
|
void | edt_set_dmy_reg_read_callback (EdtDev edt_p, uint32_t(*callback)(EdtDev edt_p, uint32_t reg_desc)) |
| Register a callback to read a simulated register when edt_reg_read() is called. More...
|
|
void | edt_set_dmy_reg_write_callback (EdtDev edt_p, void(*callBack)(EdtDev edt_p, uint32_t reg_desc, uint32_t reg_value)) |
| Register a callback to write a simulated register when edt_reg_write() is called. More...
|
|
EDT_CHECK_RETURN void * | edt_map_dmamem (EdtDev edt_p) |
| Memory-map the entire DMA channel's ring of buffers. More...
|
|
int | edt_disable_ring_buffers (EdtDev edt_p) |
| Disable EDT device ring buffers. Pending DMA is cancelled and all data buffers are released. More...
|
|
int | edt_get_numbufs (EdtDev edt_p) |
| Get the number of buffers allocated even if by other process (for monitoring from a separate call to edt_open()). More...
|
|
int | edt_reset_ring_buffers (EdtDev edt_p, uint32_t bufnum) |
| Stop any active DMA then set the ring buffer to restart on buffer bufnum . More...
|
|
int | edt_abort_dma (EdtDev edt_p) |
| Stop any active DMA then set the ring buffer to restart on the current buffer. More...
|
|
int | edt_abort_current_dma (EdtDev edt_p) |
| Stop any active DMA then set the ring buffer to restart on the next buffer. More...
|
|
int | edt_stop_buffers (EdtDev edt_p) |
| Stop DMA transfer after the current buffer has completed. Ring buffer mode remains active, and transfers may be resumed by calling edt_start_buffers(). More...
|
|
int | edt_start_buffers (EdtDev edt_p, unsigned int count) |
| Start DMA transfers for count number of buffers. More...
|
|
int | edt_set_buffer_size (EdtDev edt_p, unsigned int index, uint32_t size, uint32_t write_flag) |
| Change the size or direction of one buffer in a ring. More...
|
|
unsigned int | edt_allocated_size (EdtDev edt_p, int buffer_idx) |
| Get the allocated size of the specified buffer. More...
|
|
int | edt_get_total_bufsize (EdtDev edt_p, int bufsize, int header_size) |
| Get the total buffer size for block of buffers, in which the memory allocation size is rounded up so all buffers start on a page boundary. This is used to allocate a single contiguous block of DMA buffers. More...
|
|
void * | edt_wait_for_buffers (EdtDev edt_p, int count) |
| Blocks until the specified number of buffers have completed. More...
|
|
int | edt_ref_tmstamp (EdtDev edt_p, uint32_t val) |
| Causes application-defined events to show up in the same timeline as driver events when the event history is listed by running setdebug -g . More...
|
|
int | edt_get_timestamp (EdtDev edt_p, edt_timespec_t *ts, unsigned int bufnum) |
| Get the seconds and nanoseconds timestamp of when DMA was completed on the buffer specified by bufnum. More...
|
|
void * | edt_wait_for_next_buffer (EdtDev edt_p) |
| Wait for the next buffer that finishes DMA. Depending on how often this routine is called, buffers that have already completed DMA might be skipped. More...
|
|
void * | edt_last_buffer_timed (EdtDev edt_p, edt_timespec_t *ts) |
| Like edt_last_buffer() but also returns the time at which the DMA was complete on this buffer. More...
|
|
void * | edt_last_buffer (EdtDev edt_p) |
| Wait for the last buffer that has been transferred. Useful if an application cannot keep up with buffer transfer. If this routine is called a second time before another buffer has been transferred, it will block waiting for the next transfer to complete. More...
|
|
void * | edt_wait_buffers_timed (EdtDev edt_p, int count, edt_timespec_t *ts) |
| Block until the specified number of buffers have completed. More...
|
|
int | edt_set_buffer (EdtDev edt_p, uint32_t bufnum) |
| Set which buffer should be started next. Usually done to recover after a timeout, interrupt, or error. More...
|
|
void * | edt_next_writebuf (EdtDev edt_p) |
| Get a pointer to the next buffer scheduled for output DMA, in order to fill the buffer with data. More...
|
|
uint32_t | edt_dma_buffers_done_waiting (EdtDev edt_p) |
| Get the number of DMA buffers that have been waited for. More...
|
|
void ** | edt_buffer_addresses (EdtDev edt_p) |
| Get an array of ring buffer pointers. More...
|
|
uint32_t | edt_done_count (EdtDev edt_p) |
| Returns the cumulative count of completed buffer transfers in ring buffer mode. More...
|
|
void * | edt_check_for_buffers (EdtDev edt_p, uint32_t count) |
| Checks, without blocking, if the specified number of buffers have completed. More...
|
|
uint16_t | edt_get_direction (EdtDev edt_p) |
| Get the value of the PCD_DIRA and PCD_DIRB registers. The value from PCD_DIRB is shifted up 8 bits. More...
|
|
void | edt_startdma_reg (EdtDev edt_p, uint32_t desc, uint32_t val) |
| Set the register and value to use at the start of DMA, as set by edt_startdma_action(). More...
|
|
void | edt_enddma_reg (EdtDev edt_p, uint32_t desc, uint32_t val) |
| Sets the register and value to use at the end of dma, as set by edt_enddma_action(). More...
|
|
void | edt_startdma_action (EdtDev edt_p, uint32_t val) |
| Specifies when to perform the action at the start of a DMA transfer as specified by edt_startdma_reg(). More...
|
|
void | edt_enddma_action (EdtDev edt_p, uint32_t val) |
| Specifies when to perform the action at the end of a DMA transfer as specified by edt_enddma_reg(). More...
|
|
int | edt_do_timeout (EdtDev edt_p) |
| Cause the driver to perform the same actions as it would on a timeout. Partially filled FIFOs will be flushed and DMA will be aborted. More...
|
|
int | edt_timeouts (EdtDev edt_p) |
| Get the number of read and write timeouts that have occurred since the last call of edt_open(). More...
|
|
uint32_t | edt_get_timeout_count (EdtDev edt_p) |
| Get the number of bytes transferred at last timeout. More...
|
|
int | edt_set_timeout_action (EdtDev edt_p, EdtDmaTimeoutAction action) |
| Set the driver behavior on a timeout. More...
|
|
int | edt_get_timeout_goodbits (EdtDev edt_p) |
| Get the number of good bits in the last long word of a read buffer after the last timeout. This routine is called after a timeout if the timeout action is set to EDT_TIMEOUT_BIT_STROBE. More...
|
|
int | edt_get_goodbits (EdtDev edt_p) |
| Get the current number of good bits in the last long word of a read buffer (0 through 31). More...
|
|
int | edt_set_event_func (EdtDev edt_p, enum edt_kernel_event event_type, EdtEventFunc func, void *data, int continuous) |
| Define a function to call when an event occurs. More...
|
|
int | edt_remove_event_func (EdtDev edt_p, enum edt_kernel_event event_type) |
| Remove an event function previously set with edt_set_event_func(). More...
|
|
uint32_t | edt_get_todo (EdtDev edt_p) |
| Get the number of buffers that the driver has been told to acquire. More...
|
|
int | edt_ring_buffer_overrun (EdtDev edt_p) |
| Determine if DMA has written to more buffers in the ring than user space code has "waited" (edt_wait_for_buffers()) for. Indicates user space code cannot keep up with the DMA transfer rate. More...
|
|
int | edt_set_burst_enable (EdtDev edt_p, int enable) |
| Set the burst enable flag, determining whether the DMA master transfers as many words as possible at once, or transfers them one at a time as soon as the data is acquired. More...
|
|
int | edt_get_burst_enable (EdtDev edt_p) |
| Get the value of the burst enable flag. More...
|
|
int | edt_set_rtimeout (EdtDev edt_p, int timeout_ms) |
| Set the timeout for data receive calls. More...
|
|
int | edt_set_wtimeout (EdtDev edt_p, int timeout_ms) |
| Set the timeout for data transmit calls. More...
|
|
int | edt_get_rtimeout (EdtDev edt_p) |
| Gets the current read timeout value: the number of milliseconds to wait for DMA reads to complete before returning. More...
|
|
int | edt_get_wtimeout (EdtDev edt_p) |
| Gets the current write timeout value: the number of milliseconds to wait for DMA reads to complete before returning. More...
|
|
uint32_t | edt_overflow (EdtDev edt_p) |
| Get DMA overflow counter from the driver. Reset by edt_reset_counts(). More...
|
|
uint32_t | edt_reg_read (EdtDev edt_p, uint32_t desc) |
| Read a device register. More...
|
|
void | edt_reg_write (EdtDev edt_p, uint32_t desc, uint32_t val) |
| Write a device register. More...
|
|
uint32_t | edt_reg_or (EdtDev edt_p, uint32_t desc, uint32_t mask) |
| Perform a register read-modify-write operation in the driver, OR-ing the mask with the register value. More...
|
|
uint32_t | edt_reg_and (EdtDev edt_p, uint32_t desc, uint32_t mask) |
| Perform a register read-modify-write operation in the driver, AND-ing the mask with the register value. More...
|
|
void | edt_reg_clearset (EdtDev edt_p, uint32_t desc, uint32_t mask) |
| Toggle the register bits specified in mask , off (0) then on (1). More...
|
|
void | edt_reg_setclear (EdtDev edt_p, uint32_t desc, uint32_t mask) |
| Toggle the register bits specified in mask , on (1) then off (0). More...
|
|
void | edt_intfc_write8 (EdtDev edt_p, uint32_t offset, uint8_t data) |
| Write 8-bit value to a user interface ("UI") FPGA register. More...
|
|
uint8_t | edt_intfc_read8 (EdtDev edt_p, uint32_t offset) |
| Read 8-bit value from a user interface ("UI") FPGA register. More...
|
|
void | edt_intfc_write16 (EdtDev edt_p, uint32_t offset, uint16_t data) |
| Write 16-bit value to a user interface ("UI") FPGA register. More...
|
|
uint16_t | edt_intfc_read16 (EdtDev edt_p, uint32_t offset) |
| Read 16-bit value from a user interface ("UI") FPGA register. More...
|
|
void | edt_intfc_write32 (EdtDev edt_p, uint32_t offset, uint32_t data) |
| Write 32-bit value to a user interface ("UI") FPGA register. More...
|
|
uint32_t | edt_intfc_read32 (EdtDev edt_p, uint32_t offset) |
| Read 32-bit value from a user interface ("UI") FPGA register. More...
|
|
void | edt_bar1_write (EdtDev edt_p, uint32_t offset, uint32_t data) |
| A convenience routine to write registers in the PCI BAR1 region. Equivalent to edt_reg_write(edt_p, EDT_BAR1_REG4(offset)), data) . More...
|
|
uint32_t | edt_bar1_read (EdtDev edt_p, uint32_t offset) |
| A convenience routine to read registers in the PCI BAR1 region. Equivalent to edt_reg_read(edt_p, EDT_BAR1_REG4(offset))) . More...
|
|
void | edt_flush_fifo (EdtDev edt_p) |
| Flush the board's input and output FIFOs to allow new data transfers to start from a known state. More...
|
|
int | edt_set_firstflush (EdtDev edt_p, int flag) |
| Specify 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. More...
|
|
int | edt_enable_channels (EdtDev edt_p, uint32_t mask) |
| Set DMA channel enable bits in SSD16_CHEN or SSD16_CHEN32 register. More...
|
|
int | edt_enable_channel (EdtDev edt_p, unsigned int channel) |
| Set DMA channel enable bit in SSD16_CHEN or SSD16_CHEN32 register. More...
|
|
int | edt_disable_channels (EdtDev edt_p, uint32_t mask) |
| Clear DMA channel enable bits in SSD16_CHEN or SSD16_CHEN32 register. More...
|
|
int | edt_disable_channel (EdtDev edt_p, unsigned int channel) |
| Clear DMA channel enable bit in SSD16_CHEN or SSD16_CHEN32 register. More...
|
|
void | edt_reset_counts (EdtDev edt_p) |
| Reset timeout and overflow counters in the driver. More...
|
|
int | edt_device_unit (EdtDev edt_p) |
| Get the 'unit' number of the specified device. More...
|
|
int | edt_device_channel (EdtDev edt_p) |
| Get the 'channel' number of the specified device. More...
|
|
enum EDT_PCI_PID | edt_device_id (EdtDev edt_p) |
| Get the PCI device ID (PID) of the EDT device. More...
|
|
const char * | edt_idstr (enum EDT_PCI_PID id) |
| Get a descriptive string of a given board ID. More...
|
|
int | edt_parse_unit (const char *str, char *dev, const char *default_dev) |
| Parse an EDT device name string. Same as edt_parse_unit_channel() but without the channel number. More...
|
|
int | edt_parse_unit_channel (const char *str, char *dev, const char *default_dev, int *channel) |
| Parse an EDT device name string. Fills in the name of the device, with the default_device if specified, or a default determined by the package, and returns a unit number. Designed to facilitate a flexible device/unit command line argument scheme for application programs. Most EDT example/utility programs use this subroutine to allow users to specify either a unit number alone or a device/unit number concatenation. More...
|
|
int | edt_find_xpn (const char *part_number, char *fpga) |
| Read the default part number->fpga cross-reference file edt_parts.xpn in the current directory, and provides the FPGA if a match is found. More...
|
|
int | edt_get_xref_info (const char *path, const char *pn, char *fpga, char *sn, char *mac_type, char *mac_offset, char *mac_count, char *desc, char *rsvd1, char *rsvd2) |
| Read a part number->fpga cross-reference file and provides the FPGA and base serial number if a match is found. More...
|
|
unsigned int | edt_errno (void) |
| Get an operating system dependent error number. More...
|
|
const char * | edt_home_dir (EdtDev edt_p) |
| Get base installation directory of PCD or PDV package. More...
|
|
EDT_CHECK_RETURN int | edt_system (const char *cmdstr) |
| Performs a UNIX-like system() call which passes the argument string to a shell or command interpreter, then returns the exit status so that errors can be detected. On Windows spawnv() will be used. More...
|
|
int | edt_set_bitpath (EdtDev edt_p, const char *bitpath) |
| Set bitpath as the currently loaded "user interface" FPGA firmware ("bitfile") in the driver. More...
|
|
int | edt_get_bitpath (EdtDev edt_p, char *bitpath, int size) |
| Get file path from the driver of the currently loaded interface bitfile. More...
|
|
int | edt_get_bitname (EdtDev edt_p, char *bitfile, int size) |
| Same as edt_get_bitpath() but returns the file name without the directory. More...
|
|
int | edt_get_driver_version (EdtDev edt_p, char *version_str, size_t size) |
|
int | edt_get_driver_buildid (EdtDev edt_p, char *build_str, size_t size) |
| Get the full build ID of the EDT driver. The build ID string is the same format as that returned by edt_get_library_buildid(). More...
|
|
int | edt_get_library_version (char *version_str, size_t size) |
| Get the version string of the EDT library. Example: "1.2.3-rc4" More...
|
|
unsigned int | edt_get_version_number (void) |
| Get the EDT library version as a packed number. Example v5.6.1 would be represented as 50601 . More...
|
|
int | edt_get_library_buildid (char *build_str, size_t size) |
| Get the build ID of the EDT library. Example: "20210214124523.asdf1234 64 bit" More...
|
|
int | edt_check_version (EdtDev edt_p) |
| Ensure the EDT library and the kernel driver are the same version. More...
|
|
uint32_t | edt_get_dma_info (EdtDev edt_p, edt_dma_info_t *dmainfo) |
| Gets information about active DMA. More...
|
|
uint32_t | edt_pci_config_read (EdtDev edt_p, uint8_t offset) |
| Read a 32-bit word directly from the board's PCI configuration space. More...
|
|
int | edt_pci_reboot (EdtDev edt_p) |
| Attempt to reboot the PCI FPGA. More...
|
|
uint32_t | edt_get_bufbytecount (EdtDev edt_p, uint32_t *cur_buffer) |
| Get the number of bytes read so far into the current buffer. More...
|
|
int | edt_little_endian (void) |
| Check if currently running on a little-endian machine. More...
|
|
int | edt_unmapmem (EdtDev edt_p, void *addr, uint32_t size) |
| Unmap a PCI BAR region, previously mapped with edt_mapmem(). More...
|
|
void * | edt_mapmem (EdtDev edt_p, uint32_t addr, uint32_t size) |
| Map regions of PCI BAR space into the virtual address space of the calling process. More...
|
|
uint32_t | edt_get_mappable_size (EdtDev edt_p, int bar) |
| Get the size of a given PCI base address register (BAR) region. More...
|
|
int | edt_set_max_buffers (EdtDev edt_p, int newmax) |
| Change the maximum number of ring buffers that can be allocated. More...
|
|
int | edt_get_max_buffers (EdtDev edt_p) |
| Get the maximum number of ring buffers that can be allocated. More...
|
|
int | edt_set_kernel_buffers (EdtDev edt_p, uint32_t onoff) |
| Set flags in kernel driver to change the way kernel buffers are created and used. More...
|
|
int | edt_get_kernel_buffers (EdtDev edt_p) |
| Get the current kbufs state. More...
|
|
void | edt_free_detected_boards_list (void) |
| Free memory containing board list created & returned by any of the edt_detect_boards functions. More...
|
|
const EdtBoardInfo * | edt_detect_boards (int unit, int *nunits, int verbose) |
| Detect all EDT boards in the system. Designed for use by pciload & pciload-like applications. More...
|
|
const EdtBoardInfo * | edt_detect_boards_ids (int unit, const enum EDT_PCI_PID *idlist, int *nunits, int verbose) |
| Detect any EDT boards in the system that match the given ids. Designed for use by pciload & pciload-like applications. More...
|
|
void | edt_set_trace_regs (EdtDev edt_p, uint32_t reg_def, unsigned int state) |
| Enable or disable tracing a single reg access in the driver. More...
|
|
void | edt_trace_regs_enable (EdtDev edt_p, uint32_t state) |
| Enable global tracing of register accesses. Individual registers or register types must still be enabled using edt_set_trace_regs(). More...
|
|
int | edtdev_channels_from_type (EdtDev edt_p) |
| Get the number of (DMA) channels avaliable for this board type. More...
|
|
uint32_t | edt_get_dma_burst_size (EdtDev edt_p) |
| Get DMA burst size (between EDT DMA FIFOs and the PCI core). More...
|
|
void | edt_set_dma_burst_size (EdtDev edt_p, uint32_t new_size) |
| Set DMA burst size (between EDT DMA FIFOs and the PCI core). More...
|
|