AN295
0x1101,
// bcdHID (1.11)
This BCD-encoded value tells the host which version of the HID specification the device follows. This system
follows HID specifications defined in revision 1.11.
0x00,
// bCountryCode (none)
This field can be left blank, or it can be set to a value defining the country to which the device’s firmware has been
localized. This system, like most, has not been localized to function in a certain country.
0x01,
// bNumDescriptors (1 class Descriptor)
This value tells the host that the HID Descriptor has one subordinate descriptor. All HID descriptors have at least a
Report Descriptor which defines report sizes and data types.
0x22,
// bClassDescriptorType (report descr.)
LE(HID_REPORT_SIZE)// wDescriptorLength (203)
This section of the descriptor allows the firmware to describe the type and size of each subordinate descriptor.
4.1.15. HID IN Endpoint Descriptor
The next two descriptors define HID’s endpoints. The firmware defines the IN endpoint as follows:
0x07,
0x05,
0x81,
0x03,
0x4000,
0x0A
// bLength (7)
// bDescriptorType (ENDPOINT)
// bEndpointAddress (EP1 in)
// bmAttributes (interrupt)
// wMaxPacketSize (64)
// bInterval (10 milliseconds)
0x81,
// bEndpointAddress (EP1 in)
This value sets Endpoint 1 to be IN.
0x03,
// bmAttributes (interrupt)
This value configures the endpoint to be of type Interrupt.
0x4000,
These two bytes define the maximum packet size for the endpoint.
0x0A // bInterval (10 milliseconds)
// wMaxPacketSize (64)
This byte tells the host to send a token packet to the device requesting an IN packet once every 10 milliseconds.
4.1.16. HID OUT Endpoint Descriptor
The firmware defines HID’s OUT endpoint as follows:
0x07,
0x05,
0x02,
0x03,
0x4000,
0x01
// bLength (7)
// bDescriptorType (ENDPOINT)
// bEndpointAddress (EP2 out)
// bmAttributes (interrupt)
// wMaxPacketSize (64)
// bInterval (1 millisecond)
0x02,
// bEndpointAddress (EP2 out)
This value sets Endpoint 2 to be an OUT endpoint.
0x03,
// bmAttributes (interrupt)
As was seen in the previous descriptor, this value tells the host that the endpoint is of type Interrupt.
0x01
// bInterval (1 millisecond)
This value tells the host that the device expects to see an OUT packet once every millisecond.
Rev. 0.1
15