A key part of USB device architecture is the definition of the device's class, which describes the device's function, such as:

The USB Implementers Forum (USB-IF) defines each device class in separate specifications.

These class specifications describe:


Endpoints

An endpoint is the fundamental communication unit in a USB device. Every USB device must implement Endpoint 0 (the Default Control Pipe).

Endpoint Characteristics

Property Description
Address 4-bit number (0–15)
Direction IN (device → host) or OUT (host → device)
Transfer Type Control, Bulk, Interrupt, or Isochronous
Max Packet Size Maximum bytes per transaction
Note

Endpoint 0 is bidirectional and always uses Control transfer type. All other endpoints are unidirectional.

Maximum Endpoints


Pipes

A pipe is a logical connection between a host memory buffer and a device endpoint. Two types exist:


Transfer Types

Transfer Type Use Case Error Recovery Guaranteed Bandwidth Latency
Control Device configuration, commands Yes (retries) No Variable
Bulk Large data (storage, printers) Yes (retries) No Variable
Interrupt Small, periodic data (keyboard, mouse) Yes (retries) Yes Bounded
Isochronous Time-sensitive streaming (audio, video) No retries Yes Bounded

Device Class Hierarchy

Device Class (e.g., Mass Storage)
├── Subclass (e.g., SCSI Transparent Command Set)
│   └── Protocol (e.g., Bulk-Only Transport)

These codes are reported in either the Device Descriptor or the Interface Descriptor, depending on where the class is defined.


Common Device Classes

Class Code Class Name Example Devices
0x00 Defined at Interface level Composite devices
0x01 Audio USB microphones, speakers
0x02 CDC (Communications) USB modems, serial adapters
0x03 HID Keyboards, mice, game controllers
0x08 Mass Storage USB flash drives, external HDDs
0x09 Hub USB hubs
0x0E Video USB webcams
0xFF Vendor Specific Custom/proprietary devices

Composite vs. Compound Devices