Specifications

Endpoint Descriptor
The endpoint descriptor describes each endpoint, including the attributes and the address of each endpoint. It is possible to
have more than one endpoint for each interface. This descriptor is 7 bytes long and is set up as follows:
Endpoint address (1 byte)
Endpoint attributes. Describes transfer type (1 byte)
Maximum packet size this endpoint is capable of transferring (2 bytes)
Time interval at which this endpoint will be polled for data (1 byte)
Example of endpoint descriptor
Descriptor Length (7 bytes)
Descriptor Type (Endpoint)
Endpoint Address (IN, Endpoint 1)
Attributes (Interrupt)
Maximum Packet Size (8 bytes)
Polling Interval (10 ms)
Report Descriptor
This is the most complicated descriptor in USB. There is no set structure. It is more like a computer language that describes
the format of the devices data in detail. This descriptor is used to define the structure of the data returned to the host as well
as to tell the host what to do with that data. An example of a report descriptor can be found below.
A report descriptor must contain the following items: Input (or Output or Feature), Usage, Usage Page, Logical Minimum,
Logical Maximum, Report size, and Report Count. These are all necessary to describe the devices data.
Example of report descriptor
Usage Page (Generic Desktop)
Usage (Keyboard)
Collection (Application)
Usage Page(key codes)
Usage Minimum (224)
Usage Maximum (231)
Logical Minimum (0)
Logical Maximum (1)
Report Size (1)
Report Count (8) ; modifier byte
Input (Data, Variable, Absolute)
Report Count (1)
Report Size (8)
Input (Constant) ; reserved byte
Report Count (5)
Report Size (1)
Usage Page (LEDs)
Usage Minimum (1)
Usage Maximum (5)
Output (Data, Variable,
Absolute); LED report
Report Count (1)
Report Size (3)
Output (Constant) ;padding
Report Count (6)
Report Size (8)
Logical Minimum (0)
Logical Maximum (101)
Usage Page (key codes)
Usage Minimum (0)
Usage Maximum (101)
Input (Data, Array) ;key array(6)
End Collection
Input items are used to tell the host what type of data will be returned as input to the host for interpretation. These items
describe attributes such as data vs. constant, variable vs. array, absolute vs. relative, etc.
Usages are the part of the descriptor that defines what should be done with the data that is returned to the host. From the
example descriptor, Usage (Keyboard) tells the host that this is a keyboard device. There is also another kind of Usage tag