EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #506 background imageLoading...
Page #506 background image
Chapter 2. API Reference
[in] wTotalLength: Total length of the configuration descriptor
[in] bDescriptorType: Type of the next descriptor to get
[inout] offset: Byte offset relative to the start of the configuration descriptor. On input, it is
the offset of the current descriptor. On output, it is the offset of the returned descriptor.
int usb_parse_interface_number_of_alternate(const usb_config_desc_t *config_desc,
uint8_t bInterfaceNumber)
Get the number of alternate settings for a bInterfaceNumber.
Given a particular configuration descriptor, for a particular bInterfaceNumber, get the number of alternate set-
tings available for that interface (i.e., the max possible value of bAlternateSetting for that bInterfaceNumber).
Return int The number of alternate settings that the interface has, -1 if bInterfaceNumber not found
Parameters
[in] config_desc: Pointer to the start of a full configuration descriptor
[in] bInterfaceNumber: Interface number
const usb_intf_desc_t *usb_parse_interface_descriptor(const usb_config_desc_t
*config_desc, uint8_t bInter-
faceNumber, uint8_t bAlternateSet-
ting, int *oset)
Get a particular interface descriptor (using bInterfaceNumber and bAlternateSetting)
Given a full configuration descriptor, get a particular interface descriptor.
Note To get the number of alternate settings for a particular bInterfaceNumber, call
usb_parse_interface_number_of_alternate()
Return const usb_intf_desc_t* Pointer to interface descriptor, NULL if not found.
Parameters
[in] config_desc: Pointer to the start of a full configuration descriptor
[in] bInterfaceNumber: Interface number
[in] bAlternateSetting: Alternate setting number
[out] offset: Byte offset of the interface descriptor relative to the start of the configuration
descriptor. Can be NULL.
const usb_ep_desc_t *usb_parse_endpoint_descriptor_by_index(const usb_intf_desc_t
*intf_desc, int index,
uint16_t wTotalLength,
int *oset)
Get an endpoint descriptor within an interface descriptor.
Given an interface descriptor, get the Nth endpoint descriptor of the interface. The number of endpoints in an
interface is indicated by the bNumEndpoints field of the interface descriptor.
Note If bNumEndpoints is 0, it means the interface uses the default endpoint only
Return const usb_ep_desc_t* Pointer to endpoint descriptor, NULL if not found.
Parameters
[in] intf_desc: Pointer to thee start of an interface descriptor
[in] index: Endpoint index
[in] wTotalLength: Total length of the containing configuration descriptor
[inout] offset: Byte offset relative to the start of the configuration descriptor. On input, it is
the offset of the interface descriptor. On output, it is the offset of the endpoint descriptor.
const usb_ep_desc_t *usb_parse_endpoint_descriptor_by_address(const
usb_config_desc_t
*config_desc, uint8_t
bInterfaceNumber,
uint8_t bAlternate-
Setting, uint8_t
bEndpointAddress, int
*oset)
Get an endpoint descriptor based on an endpoints address.
Espressif Systems 495
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish