DIE Clears stall or remote wake-up and clears power states
GET_CONFIGURATION D Get current configuration number (or 0 if not configured)
GET_DESCRIPTOR D Get descriptor: Device, String or Configuration, Interface, and Endpoint.
GET_INTERFACE I Get alternate setting for interface
GET_STATUS DIE Get status, e.g., whether device is self-powered andwhether remote wake-up is signalled, or whether end-point is stalled.
SET_ADDRESS D Set the device's address
SET_CONFIGURATION D Set the configuration number
SET_DESCRIPTOR D Set or add a descriptor
SET_FEATURE DIE Sets stall or remote wake-up and sets power states
SET_INTERFACE I Select an alternate interface setting
SYNCH_FRAME E Used in isochronous transfers to indicate the start of a frame pattern.

For example, the SET_ADDRESS request is sent to assign a USB address to a device. The device returns ACK when complete. A GET_DESCRIPTOR request asks for one of the descriptors. The descriptor is returned in one or more DATA packets.

Each device class usually has various control transfer requests defined. See the appropriate specification for details.

Descriptors

Table 20.5 shows the basic types of descriptor that a device should return, along with a summary of the information in each descriptor. Figure 20.1 gives a view of the relationship between the various descriptors. String descriptors are optional. Further class specific or vendor specific descriptors can be returned. Table 20.6 lists the standard descriptor type constants.

Configuration and endpoint descriptors must not include a descriptor for Endpoint 0.

An interface may have alternate settings that redefine the number or characteristics of the associated endpoints.

For isochronous requests, the endpoint maximum packet size reserves bus time.

Table 20.5 USB descriptor types and fields

Descriptor Fields
Device Vendor ID, Product ID, and Device release number. Device class, sub class, and protocol. Number of configurations
Configuration Number of interfaces. Attributes: bus-powered, self-powered, supports remote wake-up. Maximum power required
Interface Interface number, class, subclass, and protocol. Number of endpoints.
Endpoint Endpoint number, direction, transfer type, maximum packet size, and interrupt polling interval.
String String index 0: Language ID supported by device. Others: Unicode string and length

Table 20.6 Standard descriptor type constants

USB_DEVICE_DESCRIPTOR_TYPE 0x01
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату
×