Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
USB System Architecture (USB 2.0).pdf
Скачиваний:
173
Добавлен:
03.05.2015
Размер:
7.03 Mб
Скачать

Chapter 19: USB Device Configuration

When the hub receives the Reset Port request, it delivers a single-ended zero (SE0) for >10ms as described in the LS/FS Signaling and HS Signaling chapters. The reset enables the port and places the device into its default state. In the default state a device has a device number of zero.

Reading and Interpreting the USB Descriptors

Device implementers must create descriptors to reflect the characteristics and behavior of the device. This chapter provides the definition and format of the standard descriptors that must accompany every USB device.

The Standard Descriptors

Every USB device contains the standard descriptors. These common descriptors are understood by the USB driver software, which will parse the descriptors to determine the device’s USB characteristics and its device class information to locate the appropriate client software.

Following is a list of the descriptors and the primary information contained in each:

Device Descriptor — describes the number of configurations supported by the device, and specifies vendor information and the device’s class.

Configuration Descriptors — specify one or more interfaces and define certain attributes associated with this configuration.

Interface Descriptors — define the number of endpoints related to the interface and define certain attributes associated with the interface.

Endpoint Descriptors — specify the attributes associated with a given endpoint along with information needed by host software to determine how the endpoint should be accessed.

String Descriptors — optional descriptors consisting of a UNICODE string that provides human-readable information that can be displayed.

Class-Specific Descriptors — a given device class may require additional descriptors as defined by a particular device class specification.

Each descriptor contains a type field that identifies the descriptor as one of the descriptors listed above. Table 19-5 on page 354 lists the type codes that identify the descriptors. The descriptor type values are used when accessing and parsing the descriptors.

353

USB System Architecture

Table 19-5: Descriptor Type Values

Descriptor Types

Value

 

 

 

 

DEVICE

1

 

 

CONFIGURATION

2

 

 

STRING

3

 

 

INTERFACE

4

 

 

ENDPOINT

5

 

 

DEVICE_QUALIFIER

6

 

 

OTHER_SPEED_CONFIGURATION

7

 

 

INTERFACE POWER

8

 

 

How Software Accesses the Descriptors

Configuration software performs the GetDescriptor request when accessing descriptors. Table 19-6 shows the format of the 8 byte setup transaction for getting descriptors. The request field specifies GetDescriptor and the value field identifies which descriptor the device must return to configuration software. In this example, the request specifies “Device” descriptor in the value field. The only descriptor type values that are legal are: 01h (device), 02h (configuration), or 03h (string). When configuration software wishes to access interface or endpoint descriptors, it must do so by accessing the configuration descriptor, which returns all the descriptors that describe the complete configuration (including interface and endpoint descriptors). Refer to “Set/Get Descriptor” on page 440 for details regarding the formats for performing the other GetDescriptor requests.

354

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]