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

USB System Architecture

Bulk Transfer Endpoints

Bulk transfer endpoints are used to either read from and write to the mass storage media. Since bulk transfers are unidirectional, separate bulk endpoints are required for reading and writing.

Interrupt Endpoint

The interrupt endpoint returns status information when requested by the storage class driver to determine the completion status of a command that has been previously issued to the mass storage device.

General Mass Storage Subclass

The general mass storage subclass is designed to support devices with removable media. However, hard drives are also included in this subclass and are viewed as devices that have their media permanently locked. The devices specifically supported by this subclass include:

Floppy Drive

Magneto-Optical

Zip (floptical)

Syquest

Hard Drives

Access to all these devices is very similar since they support random read and write operations in a block/sector oriented fashion. The SCSI command protocol is supported by these devices and used to issue commands via the default control endpoint. For backward compatibility, some of these device (e.g., floppy drive) must work with media from older operating systems, such as DOS, that use cylinders, heads, and sectors (CHS) to address the device. These device must be capable of determining and reporting device geometry associated with the media. In this way, CHS information can be translated by BIOS and/or the operating system into logical blocks.

CD-ROM Subclass

The interface associated with a CD-ROM requires a different combination of endpoints than those used by the other subclasses. This is due to the CD-ROM’s ability to store CPU data (code and data within files), audio, and video. CDROMs must support mass storage and audio interfaces, and may optionally

416

Chapter 21: Device Classes

include an audio/video interface. These additional interfaces might include isochronous endpoints and must be accessed and manipulated by other class drivers (i.e., audio class driver). The specification defines the interface number that must be defined within the interface descriptor’s “interface number” field for each interface supported by a CD-ROM. Since the mass storage and audio interfaces are required, there will be at least two interfaces defined by a CD-ROM. The interface numbers are:

00h = Mass Storage interface

01h = Audio interface

02h = Audio with Video interface

The CD-ROM mass storage interface uses the same endpoints, with the exception of the bulk OUT endpoint. The bulk OUT endpoint is not needed, since data can only be read from the media. The interrupt endpoint for CD-ROMs is used only to report media change.

CD-ROMs are sector/block oriented devices, but unlike the general subclass devices, the sector sizes can be much larger. CD-ROM sector sizes can vary from 2000 bytes to over 3000 bytes in contrast with the typical 2048 sector size for the general subclass devices.

Tape Subclass

Devices within this subclass are those that have removable media and require streaming data. The nature of streaming tape access is that it may take an extended amount of time to seek the information requested; hence, the term pseudo-random access is used to describe access to tape. USB tape devices support the AdvancedTechnology Attachment Packet Interface (ATAPI) for tape of the QIC-157 standard.

Solid State Subclass

Solid state mass storage devices typically require that a memory block be erased prior to data writes. Solid state devices are specified to transfer data only and do not require any isochronous endpoints. The interface uses portions of the SCSI-2 protocol defined for “Direct Access Storage and Optical Memory Device’s.” This interface supports a subset of the SCSI command set. Refer to the specification for details regarding the SCSI commands supported by solid state storage devices.

417

USB System Architecture

Classand Device-Specific USB Requests

The programming interface used by mass storage devices includes use of the default control endpoint to deliver commands to the device. The commands are sent via USB control transfers. These devices support the standard requests defined by the USB specification, but also support class-specific and subclassspecific requests that are defined by the mass storage device class specification.

One class-specific request is defined for mass storage devices, and is used to send subclass-specific (or device-specific) commands. This request is defined as the Accept Device-Specific Command (ADSC) request. This request is defined as request number zero. When issued, the device-specific command is sent during the data stage of the control transfer. The format of the command depends on the subclass of the mass storage device as follows:

General Mass Storage — ANSI X3.131, Small Computer Systems Interface-2

CD-ROMSFF-8020i, ATA Packet Interface for CD-ROMs

Tape — QIC-157, ATA Packet Interface forTape

Solid State — QIC-157, ATA Packet Interface for Tape and SCSI command set (with modifications)

418

Part Six

USB Software

Overview

Part Six discusses the USB host software environment. This information is an overview that describes the primary requirements of host software, but does not deal with any specific operating environment.

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