USB_GET_DEVICE_DESCRIPTOR

Section: ()
Updated: 06 October 2005
Index Return to Main Contents

 

NAME

usb_get_device_descriptor - (re)reads the device descriptor  

SYNOPSIS

"SYNOPSIS"

int usb_get_device_descriptor (struct usb_device * dev);  

ARGUMENTS

dev
the device whose device descriptor is being updated
 

CONTEXT

!in_interrupt ()  

DESCRIPTION

Updates the copy of the device descriptor stored in the device structure, which dedicates space for this purpose. Note that several fields are converted to the host CPU's byte order: the USB version (bcdUSB), and vendors product and version fields (idVendor, idProduct, and bcdDevice). That lets device drivers compare against non-byteswapped constants.

There's normally no need to use this call, although some devices will change their descriptors after events like updating firmware.

This call is synchronous, and may not be used in an interrupt context.

Returns the number of bytes received on success, or else the status code returned by the underlying usb_control_msg call.


 

Index

NAME
SYNOPSIS
ARGUMENTS
CONTEXT
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 05:31:02 GMT, October 06, 2005