1USB_GET_DESCRIPTOR(9)            USB Core APIs           USB_GET_DESCRIPTOR(9)
2
3
4

NAME

6       usb_get_descriptor - issues a generic GET_DESCRIPTOR request
7

SYNOPSIS

9       int usb_get_descriptor(struct usb_device * dev, unsigned char type,
10                              unsigned char index, void * buf, int size);
11

ARGUMENTS

13       dev
14           the device whose descriptor is being retrieved
15
16       type
17           the descriptor type (USB_DT_*)
18
19       index
20           the number of the descriptor
21
22       buf
23           where to put the descriptor
24
25       size
26           how big is “buf”?
27

CONTEXT

29       !in_interrupt ()
30

DESCRIPTION

32       Gets a USB descriptor. Convenience functions exist to simplify getting
33       some types of descriptors. Use usb_get_string or usb_string for
34       USB_DT_STRING. Device (USB_DT_DEVICE) and configuration descriptors
35       (USB_DT_CONFIG) are part of the device structure. In addition to a
36       number of USB-standard descriptors, some devices also use
37       class-specific or vendor-specific descriptors.
38
39       This call is synchronous, and may not be used in an interrupt context.
40
41       Returns the number of bytes received on success, or else the status
42       code returned by the underlying usb_control_msg call.
43
45Kernel Hackers Manual 2.6.         June 2019             USB_GET_DESCRIPTOR(9)
Impressum