libusb Developers Guide
Prev |  | Next

# usb_get_descriptor_by_endpoint

## Name

usb_get_descriptor_by_endpoint -- Retrieves a descriptor from a device

## Description

``int usb_get_descriptor_by_endpoint` (usb_dev_handle *dev); int ep); unsigned char type); unsigned char index); void *buf); int size);`

`usb_get_descriptor_by_endpoint` retrieves a descriptor from the device identified by the `type` and `index` of the descriptor from the control pipe identified by `ep`. Returns number of bytes read for the descriptor or 0 on error.

Prev | Home | Next
usb_get_descriptor | Up | Bulk Transfers