Information Technology Reference
In-Depth Information
If the receiver is busy and returns a NAK, or if the receiver detects corrupted
data and returns no response, the sender doesn't toggle its bit and tries again
with the same data and data toggle.
Control transfers always use DATA0 in the Setup stage, use DATA1 in the
first transaction of the Data stage, toggle the value in any additional
Data-stage transactions, and use DATA1 in the Status stage. Bulk endpoints
toggle the value in every transaction, resetting the data toggle only after a
bus reset or completing a Set Configuration, Set Interface, or Clear Fea-
ture(ENDPOINT HALT) request.
Descriptors
During enumeration, the host computer uses control transfers to request the
device's descriptors, which are data structures that contain information
about a device's capabilities and requirements. The descriptors enable the
host computer to select an appropriate driver for the device. The descriptors
also provide information the driver needs to communicate with the device.
Table 2-1 shows a set of descriptors for a mass-storage device. Every USB
device must have descriptors and the ability to send the descriptors to the
host on request. The USB specifications define the descriptors.
A device that can operate at both full and high speeds must support two sets
of descriptors. For a mass-storage device, the values in each set can be identi-
cal except that the bulk endpoints in the high-speed descriptors have a
wMaxPacketSize of 512 instead of 64. Chapter 3 has more about descrip-
tors.
Mass Storage Requirements
In addition to what's required for any USB device, a USB mass-storage
device must have all of the following:
An interface descriptor with the class code = 08h (mass storage).
A bulk IN endpoint and a bulk OUT endpoint that belong to the
mass-storage interface.
A serial number stored in a string descriptor.
Storage media.
The ability to access the storage media's contents using logical block
addressing.
Search WWH ::




Custom Search