UM10375 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2011. All rights reserved.
User manual Rev. 3 — 14 June 2011 178 of 368
NXP Semiconductors
UM10375
Chapter 11: LPC13xx USB on-chip drivers
11.6.4 Example descriptors
Example HID descriptor
USB_HID_StringDescriptor[] = { 0x04, USB_STRING_DESCRIPTOR_TYPE, 0x0409
/* Index 0x04: Manufacturer */
0x1C, USB_STRING_DESCRIPTOR_TYPE,
'N',0, 'X',0, 'P',0,' ',0,'S',0, 'E',0, 'M',0,'I',0, 'C',0,'O',0,'N',0,‘D',0,' ',0,
/* Index 0x20: Product */
0x28,USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
'N',0, 'X',0, 'P',0, ' ',0, 'L',0, 'P',0, 'C',0, '1',0, '3',0, 'X',0,
'X',0, ' ',0, 'H',0, 'I',0, 'D',0, ' ',0, ' ',0, ' ',0, ' ',0,
/* Index 0x48: Serial Number */
0x1A, USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
'D',0, 'E',0, 'M',0, 'O',0, '0',0, '0',0, '0',0, '0',0, '0',0, '0',0,
'0',0, '0',0,
/* Index 0x62: Interface 0, Alternate Setting 0 */
0x0E, USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */
'H',0, 'I',0, 'D',0, ' ',0, ' ',0, ' ',0,
};
bInterval User Defined Polling interval (Provided by the Application Software)
HID report descriptor
Usage Page 0x06 01 00 Generic Desktop
Usage 0x09 01 Vendor Usage 1
Collection 0xA1 01 Start of Collection, Application
Logical Minimum 0x15 00 Minimum value 0x00
Logical Maximum 0x26 FF 00 Maximum Value 0xFF
Report Size 0x75 08 Number of bits, 8
Report Count 0x95 xx Provided by the application software
Usage 0x09 01 Vendor usage 1
Input 0x81 02 Data, Variable, Absolute
Report Count 0x95 xx Provided by the application software
Usage 0x09 01 Vendor usage 1
Output 0x91 02 Data, Variable, Absolute
End Collection 0xC0 End of collection
Table 191. HID descriptors
Field Value Description