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

Chapter 19: USB Device Configuration

vendor specific and only the vendor-specific USB device driver would be able to correctly interpret the descriptors and access the device.

Maximum Packet Size Zero

This field is used by configuration software to determine the maximum data packet size supported by endpoint zero. When the device is initially accessed, it is accessed with the minimum packet size of 8 bytes. If the packet size defined by this field indicates a larger value, then the device contains a larger data buffer that can support the packet size defined. Subsequent accesses to endpoint zero can then be performed more efficiently.

Manufacturer, Product, Serial Number

Optional string descriptors can be included that provide human-readable information related to the manufacturer, product, and serial number of the device. Each of the these fields located at offset 16:14 within the “device” descriptor identifies the location of the string descriptors stating the manufacturer and describing the product, and listing the serial number of the device. The value within the description is defined as an index. This index is used by software to access the corresponding string via the “Get Descriptor” request. To access a string descriptor software must specify the descriptor type (01h) and the index number (specified in the descriptor) when performing the “Get Descriptor” request. Table A-4 on page 441 shows the format and definition of the Get Descriptor request’s setup data. Note that the “value” field specifies the descriptor type and index and the “index” field contains the language ID.

Number of Configurations

A device may define additional configurations to provide flexibility during configuration and enhance the probability that the device can be successfully configured. As an example, a device may normally consume two units of current (200ma); however, if the device is attached to a bus powered USB port, only 100ma of current may be available. In this case the device could not be supported and host software would not enable the device. To avoid this problem, a device designer may decide to provide an alternate configuration that reduces the amount of bus current required by the device to 100ma.

The number of configurations field specifies the number of configurations supported. Host software reads the configurations and decides which configuration to select. The specification states that the device driver may be consulted to help determine which configuration to select, but the mechanism for such input from the device driver is not defined.

359

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