AN249 Silicon_Laboratories, AN249 Datasheet - Page 17

no-image

AN249

Manufacturer Part Number
AN249
Description
Human Interface Device Tutorial
Manufacturer
Silicon_Laboratories
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AN2490NFHP
Manufacturer:
PANASONIC/松下
Quantity:
20 000
Part Number:
AN2491NFHP
Manufacturer:
PANASON
Quantity:
5 510
Part Number:
AN2491NFHP
Manufacturer:
MAXIM
Quantity:
5 510
5.4.6. HID Descriptor
This class-specific descriptor gives the host information specific to the device at the above-defined configuration.
The descriptor looks as follows:
{ // class_descriptor hid_descriptor
}
This length describes the size of the HID Descriptor. It can vary depending on the number of subordinate
descriptors, such as Report Descriptors, that are included in this HID Configuration definition.
0x21 is the constant one-byte designator for Device Descriptors and should be common to all HID Descriptors.
This two-byte item tells the host which version of the HID Class Specification the device follows. USB specification
requires that this value be formatted as a Binary Coded Decimal digit, meaning that the upper and lower nibbles of
each byte represent a the number '0'...9'. In this case, 0x0101 represents the number 0101, which equals a
revision number of 1.01 with an implied decimal point.
If the device was designed to be localized to a specific country, this item tells the host which country. Setting the
item to 0x00 tells the host that the device was not designed to be localized to any country.
This item tells the host how many Report Descriptors are contained in this HID configuration. The following two-
byte pairs of items describe each contained Report Descriptor. The firmware template is configured to contain a
single Report Descriptor, which can define multiple reports.
This item describes the first descriptor which will follow the transfer of this HID descriptor. “0x22” indicates that the
descriptor to follow is a Report Descriptor.
descriptor)
This item tells the host the size of the descriptor that is described in the preceding item. The value for
HID_REPORT_DESCRIPTOR_SIZE_LE can be set in the F3xx_USB0_Descriptor.h header file.
If the HID Descriptor contains more than one subordinate descriptor, those descriptors would be defined at this
point, in two-byte pairs like the Report Descriptor declared above.
0x09,
0x21,
0x0101,
0x00,
0x01,
0x22,
HID_REPORT_DESCRIPTOR_SIZE_LE // wItemLength (total length of report descriptor)
0x09,
0x21,
0x0101,
0x00,
0x01,
0x22,
HID_REPORT_DESCRIPTOR_SIZE_LE
// bLength
// bDescriptorType
// bcdHID
// bCountryCode
// bNumDescriptors
// bDescriptorType
// bLength
// bDescriptorType
// bcdHID
// bCountryCode
// bNumDescriptors
// bDescriptorType
//
Rev. 0.2
wItemLength
(total
length
of
AN249
report
17

Related parts for AN249