Specifications

Bit 7 Bit 0
Right
GUI
Right
Alt
Right
Shift
Right
Ctrl
Left
GUI
Left AltLeft
Shift
Left
Ctrl
Byte 0-
Modifier
Figure 2. IN Data Organization for USB Keyboard
Bit 7 Bit 0
Con
stant
Con
stant
Con
stant
Kana Com
pose
Scroll
Lock
Caps
Lock
Num
Lock
Byte 0-
LED report
Figure 2. LED Report for USB Keyboard
The byte order and bit field positions are defined by the HID report descriptor (discussed below), and are also consistent with
the Boot Protocol requirements for legacy systems.
USB Descriptors
As stated earlier, the USB descriptors hold information about the device. There are several types of descriptors, which will be
discussed in detail below. All descriptors have certain characteristics in common. Byte 0 is always the descriptor length in
bytes and Byte 1 is always the descriptor type. Discussion of these two bytes will be omitted from the following descriptions.
The rest of the descriptor structure is dependent on the descriptor type. An example of each descriptor will be given.
Descriptor types are device, configuration, interface, endpoint, string, report, and several different class descriptors.
Device Descriptor
This is the first descriptor the host requests from the device. It contains important information about the device. The size of
this descriptor is 18 bytes. A list follows:
USB Specification release number in binary-coded decimal (BCD) (2 bytes)
Device class (1 byte)
Device subclass (1 byte)
Device protocol (1 byte)
Max packet size for Endpoint 0 (1 byte)
Vendor ID (2 bytes)
Product ID (2 bytes)
Device release number in BCD (2 bytes)
Index of string describing Manufacturer (Optional) (1 byte)
Index of string describing Product (Optional) (1 byte)
Index of string containing serial number (Optional) (1 byte)
Number of configurations for the device (1 byte)
Example of a device descriptor
Descriptor Length (18 bytes)
Descriptor Type (Device)
Complies to USB Spec Release (1.00)
Class Code (insert code)
Subclass Code (0)
Protocol (No specific protocol)
Max Packet Size for endpt 0 (8 bytes)
Vendor ID (Cypress)
Product ID (USB Keyboard)
Device Release Number (1.03)
String Describing Vendor (None)
String Describing Product (None)
String for Serial Number (None)
Possible Configurations (1)