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

USB System Architecture

Table 20-3: Hub Interface Descriptor

Offset

Field

Size

Value

Description

 

 

 

 

 

 

 

 

 

 

4

NumEnd-

1

Number

Number of endpoints used by this

 

points

 

 

interface (excluding endpoint zero).

 

 

 

 

Hub must implement a status change

 

 

 

 

endpoint. (Hubs must implement a

 

 

 

 

status change endpoint, but may also

 

 

 

 

include additional endpoints.)

 

 

 

 

 

5

Interface-

1

Class

Class code (assigned by USB).

 

Class

 

 

 

 

 

 

 

If this field is reset to zero, the interface

 

 

 

 

does not belong to any USB specified

 

 

 

 

device class.

 

 

 

 

 

6

Interface-

1

Subclass

Subclass code (assigned by USB).

 

Subclass

 

 

These codes are qualified by the value

 

 

 

 

of the InterfaceClass field.

 

 

 

 

 

7

Interface

1

Protocol

Protocol code (assigned by USB).

 

Protocol

 

 

 

 

 

 

 

If this field is reset to zero, the device

 

 

 

 

does not use a class-specific protocol

 

 

 

 

on this interface. If this field is set to

 

 

 

 

0xFF, the device uses a vendor-specific

 

 

 

 

protocol for this interface.

 

 

 

 

 

8

Interface

1

01h

Index of string descriptor.

 

 

 

 

 

Status Endpoint Descriptor

The hub function defines only the status change endpoint.Table 20-4 shows the definition of the status endpoint descriptor. Enumerator software obtains the following information from the endpoint descriptor:

Status change endpoint address

Direction of transfer

Transfer type supported by this endpoint

Maximum data packet size supported

Interval at which the endpoint should be polled

384

Chapter 20: Hub Configuration

Note that the specification requires that the status change endpoint be the first endpoint descriptor read from the hub when the standard Get Descriptor device request is made.

Status Change Endpoint Address/Transfer Direction

The status change endpoint number is specified within the field at offset 2 of the endpoint descriptor. This field specifies the endpoint number (bits 0:3), which is determined at design time and hardwired into the device’s address decoder and is implementation dependent. Bit 7 within the same field specifies the direction of the data transfers associated with the endpoint. This bit must be set to indicate that transfers are from the status change endpoint to the host (i.e., IN transactions).

Transfer Type

The transfer type required by this endpoint is defined in the attribute field (offset 3). The status change endpoint is accessed based on the interrupt transfer type and is pre-defined by the specification. Host software will poll the status register at regular intervals to determine if a status change has occurred. Section “Detecting Hub Status Changes” on page 397 describes the information read from the status change port during an interrupt transfer.

Maximum Data Packet Size

The maximum packet size field (offset 4) specifies the maximum data payload that can be supported by this endpoint during a single transaction. The data payload size options for an interrupt transfer are 8, 16, 32, and 64 bytes. The value chosen relates to the data buffer size for the endpoint and is implementation dependent.

Polling Interval

Since the status change endpoint is defined for interrupt transfers, the polling interval (offset 6) defines how often the endpoint should be polled. The specification pre-defines the polling interval for the status change endpoint to the maximum allowable value of FFh. As a result, configuration software polls this endpoint every 255ms to check for port events (e.g., device connect or disconnect).

385

USB System Architecture

Table 20-4: Hub Status Endpoint Descriptor

Offset

Field

Size

Value

 

Description

 

 

 

 

 

 

 

 

 

 

0

Length

1

Number

Size of this descriptor in bytes.

 

 

 

 

 

1

DescriptorType

1

Constant

ENDPOINT Descriptor Type

 

 

 

 

 

2

EndpointAddress

1

Endpoint

The address of the endpoint on the

 

 

 

 

USB device described by this

 

 

 

 

descriptor. The address is encoded

 

 

 

 

as follows:

 

 

 

 

 

Bits 0:3 the endpoint number

 

 

 

 

Bits 4:6 reserved, reset to zero

 

 

 

 

Bits 7

must be “1” — IN end-

 

 

 

 

 

point

 

 

 

 

 

3

Attributes

1

Bitmap

This field describes the endpoint’s

 

 

 

 

attributes when it is configured

 

 

 

 

using the ConfigurationValue:

 

 

 

 

Bits 0:1

Transfer Type:

 

 

 

 

11

Interrupt only

 

 

 

 

All other bits are reserved

 

 

 

 

 

4

MaxPacketSize

2

Number

Maximum packet size this endpoint

 

 

 

 

is capable of sending or receiving

 

 

 

 

when this configuration is selected.

 

 

 

 

For interrupt endpoints smaller data

 

 

 

 

payloads may be sent, but these will

 

 

 

 

terminate the transfer, which may or

 

 

 

 

may not require intervention to

 

 

 

 

restart.

 

 

 

 

 

 

6

Interval

1

FF

Interval for polling endpoint for

 

 

 

 

data transfers. Expressed in millisec-

 

 

 

 

onds. For interrupt endpoints, this

 

 

 

 

field may range from 1 to 255.

 

 

 

 

 

 

386

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