up | Inhaltsverzeichniss | Kommentar

Manual page for xil_device_create(3)

xil_device_create, xil_device_destroy - create or destroy a device object

SYNOPSIS

#include <xil/xil.h>

XilDevice xil_device_create ( XilSystemState State,
char *device);


void xil_device_destroy ( XilDevice deviceObj);

DESCRIPTION

xil_device_create () creates a device object and associates it with a particular device type; the object is used to store initialization attributes for its associated device. State is the XIL system state, and device is the name of the associated device type. The device name must be provided by the group that writes the device handler.

A device object is associated with a particular device type and cannot be associated with a different device type. Its only use is to initialize device attributes when you call the xil_create_from_device.3 function to create the device image. Device objects are particularly useful for storing interdependent attributes that must be simultaneously set for a device, or for setting attributes that require a substantial memory allocation.

xil_device_destroy () destroys the specified device object. Its only parameter is the handle to the device object.

ERRORS

For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer's Guide.

EXAMPLES

Create a device object associated with the device "my_device":

XilSystemState State;
XilDevice deviceObj;

deviceObj = xil_device_create (State, "my_device");

NOTES

A device object cannot be used to adjust a device image's attributes after the image is created; xil_set_device_attribute.3 does that. However, after using the device object to create one device image, you can use the same object to store different initialization attributes, then use the modified device object when you create another device image of the same type.

Devices that don't require attribute initialization typically don't recognize or support device objects. For these devices, you can't use a device object to set attributes.

SEE ALSO

xil_device_set_value.3 xil_create_from_device.3 xil_set_device_attribute.3


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).

Last modified 07/October/97