Startup / Shutdown
[EDT DMA Library]


Detailed Description

These functions are used to open and close the EDT device.


Functions

int edt_close (EdtDev *edt_p)
int edt_get_port (EdtDev *edt_p)
 Routine to get the "port" number, as distinct from the dma channel.
EdtDevedt_open (const char *device_name, int unit)
 Opens the specified EDT Product and sets up the device handle.
EdtDevedt_open_channel (const char *device_name, int unit, int channel)
 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.
EdtDevedt_open_device (const char *device_name, int unit, int channel, int verbose)
EdtDevedt_open_quiet (const char *device_name, int unit)
 Just a version of edt_open that does so quietly, so we can try opening the device just to see if it's there without a lot of printfs coming out.
void edt_set_port (EdtDev *edt_p, int port)
 Routine to set the "port" number, as distinct from the dma channel.


Function Documentation

EdtDev* edt_open ( const char *  device_name,
int  unit 
)

Opens the specified EDT Product and sets up the device handle.

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. When finished, use edt_close to release any resources allocated during use.

Parameters:
device_name a string with the name of the EDT Product board; for example, "pcd". EDT_INTERFACE can also be used; it is defined as the name of the board type in edtdef.h.
unit Unit number of the device (if multiple devices). The first unit is always 0.
Returns:
A pointer to the EdtDev structure if successful. This data structure holds information about the device which is needed by library functions. User applications should avoid accessing structure elements directly. NULL is returned if unsuccessful, and the global variable errno is set. Use edt_perror to print an error message.

Definition at line 784 of file libedt.c.

EdtDev* edt_open_channel ( const char *  device_name,
int  unit,
int  channel 
)

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.

To open a device with only one channel, just use edt_open.

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. When finished, use edt_close to release any resources allocated during use.

Parameters:
device_name a string with the name of the EDT Product board; for example, "pcd". EDT_INTERFACE can also be used; it is defined as the name of the board type in edtdef.h.
unit Unit number of the device (if multiple devices). The first unit is always 0.
channel specifies DMA channel number (counting from zero).
Returns:
A pointer to the EdtDev structure if successful. This data structure holds information about the device which is needed by library functions. User applications should avoid accessing structure elements directly. NULL is returned if unsuccessful, and the global variable errno is set. Use edt_perror to print an error message.

Definition at line 838 of file libedt.c.

EdtDev* edt_open_quiet ( const char *  device_name,
int  unit 
)

Just a version of edt_open that does so quietly, so we can try opening the device just to see if it's there without a lot of printfs coming out.

Parameters:
device_name a string with the name of the EDT Product board; for example, "pcd". EDT_INTERFACE can also be used; it is defined as the name of the board type in edtdef.h.
unit Unit number of the device (if multiple devices). The first unit is always 0.
Returns:
Pointer to EdtDev struct, or NULL if error.

Definition at line 805 of file libedt.c.


Generated on 19 Jun 2015 by  doxygen 1.4.7