Windows PowerShell command on Get-command usb_lookup_ep_data
MyWebUniversity

Manual Pages for UNIX Operating System command usage for man usb_lookup_ep_data

Kernel Functions for Drivers usb_lookup_ep_data(9F)

NAME

usb_lookup_ep_data - Lookup endpoint information

SYNOPSIS

#include

usb_ep_data_t *usb_lookup_ep_data(dev_info_t *dip,

usb_client_dev_data_t *dev_datap, uint_t interface,

uint_t alternate, uint_t skip, uint_t type, uint_t direction);

INTERFACE LEVEL

Solaris DDI specific (Solaris DDI)

PARAMETERS

dip Pointer to the device's dev_info structure.

dev_datap Pointer to a usb_client_dev_data_t structure

containing tree. interface Number of interface in which endpoint resides. alternate Number of interface alternate setting in which endpoint resides. skip Number of endpoints which match the requested type and direction to skip before finding one to retrieve. type Type of endpoint. This is one of:

USB_EP_ATTR_CONTROL, USB_EP_ATTR_ISOCH,

USB_EP_ATTR_BULK, or USB_EP_ATTR_INTR. Please

see usb_pipe_open(9F) for more information.

direction Direction of endpoint, either USB_EP_DIR_OUT or

USB_EP_DIR_IN. This argument is ignored for

bi-directional control endpoints.

DESCRIPTION

The usb_lookup_ep_data() function returns endpoint informa-

tion from the tree embedded in client data returned from

usb_get_dev_data. It operates on the current configuration

(pointed to by the dev_curr_cfg field of the

usb_client_dev_data_t argument). It skips the first

number of endpoints it finds which match the specifications

SunOS 5.11 Last change: 5 Jan 2004 1

Kernel Functions for Drivers usb_lookup_ep_data(9F)

of the other arguments, and then retrieves information on the next matching endpoint it finds. Note that it does not make a copy of the data, but points to the tree itself.

RETURN VALUES

On success: the tree node corresponding to the desired end-

point.

On failure: returns NULL. Fails if dip or dev_datap are

NULL, if the desired endpoint does not exist in the tree, or

no tree is present in dev_datap.

CONTEXT

May be called from user, kernel or interrupt context.

EXAMPLES

Retrieve the polling interval for the second interrupt end-

point at interface 0, alt 3:

uint8_t interval = 0;

usb_ep_data_t *ep_node = usb_lookup_ep_data(

dip, dev_datap, 0, 3, 1, USB_EP_ATTR_INTR, USB_EP_DIR_IN);

if (ep_node != NULL) {

interval = ep_node->ep_descr.bInterval;

} Retrieve the maximum packet size for the first control pipe at interface 0, alt 4:

uint16_t maxPacketSize = 0;

usb_ep_data_t *ep_node = usb_lookup_ep_data(

dip, dev_datap, 0, 4, 0, USB_EP_ATTR_CONTROL, 0);

if (ep_node != NULL) {

maxPacketSize = ep_node->ep_descr.wMaxPacketSize;

}

ATTRIBUTES

See attributes(5) for descriptions of the following attri-

butes:

SunOS 5.11 Last change: 5 Jan 2004 2

Kernel Functions for Drivers usb_lookup_ep_data(9F)

____________________________________________________________

| ATTRIBUTE TYPE | ATTRIBUTE VALUE |

|_____________________________|_____________________________|

| Architecture | PCI-based systems |

|_____________________________|_____________________________|

| Interface Stability | Committed |

|_____________________________|_____________________________|

| Availability | driver/usb |

|_____________________________|_____________________________|

SEE ALSO

attributes(5), usb_get_dev_data(9F), usb_pipe_open(9F),

usb_cfg_descr(9S), usb_if_descr(9S), usb_ep_descr(9S)

SunOS 5.11 Last change: 5 Jan 2004 3




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™