
PCI CD and PCI CDa
Document Number: 008-00965-06 EDT Public Revision: I December 2004
Template: edt.dot
Page 18
Arguments
devname
a string with the name of the EDT Product board. For example, “edt”.
unit
specifies the device unit number
Return
A handle of type (EdtDev *), or NULL if error. (The structure(EdtDev *) is defined in libedt.h.) If an
error occurs, check the errno global variable for the error number. The device name for the EDT
Product is “edt”. Once opened, the device handle may be used to perform I/O using edt_read(),
edt_write(), edt_configure_ring_buffers(), and other input-output library calls.
edt_open_channel
Description
Opens a specific DMA channel on the specified EDT Product, when multiple channels are supported
by the Xilinx firmware, and sets up the device handle. Use edt_close() to close the channel.
Syntax
#include "edtinc.h"
EdtDev *edt_open_channel(char *devname, int unit, int channel) ;
Arguments
devname
a string with the name of the EDT Product board. For example, “edt”.
unit
specifies the device unit number
channel
specifies the DMA channel number counting from zero
Return
A handle of type (EdtDev *), or NULL if error. (The structure(EdtDev *) is defined in libedt.h.) If an
error occurs, check the errno global variable for the error number. The device name for the EDT
Product is “edt”. Once opened, the device handle may be used to perform I/O using edt_read(),
edt_write(), edt_configure_ring_buffers(), and other input-output library calls.
edt_close
Description
Shuts down all pending I/O operations, closes the device or channel and frees all driver resources
associated with the device handle.
Syntax
#include "edtinc.h"
int edt_close(EdtDev *edt_p);
Arguments
edt_p
device handle returned from edt_open or edt_open_channel.
Return
0 on success; –1 on error. If an error occurs, call edt_perror() to get the system error message.
Comentários a estes Manuais