This is not a string, but binary data. Here is a similar descriptor from a test project.
Code: Select all
const uint8_t Joystick_ReportDescriptor[JOYSTICK_SIZ_REPORT_DESC] =
{
0x05, /*Usage Page(Generic Desktop)*/
0x01,
0x09, /*Usage(Mouse)*/
0x02,
0xA1, /*Collection(Logical)*/
0x01,
0x09, /*Usage(Pointer)*/
0x01,
/* 8 */
0xA1, /*Collection(Linked)*/
0x00,
0x05, /*Usage Page(Buttons)*/
0x09,
0x19, /*Usage Minimum(1)*/
0x01,
0x29, /*Usage Maximum(3)*/
0x03,
/* 16 */
0x15, /*Logical Minimum(0)*/
0x00,
0x25, /*Logical Maximum(1)*/
0x01,
0x95, /*Report Count(3)*/
0x03,
0x75, /*Report Size(1)*/
0x01,
/* 24 */
0x81, /*Input(Variable)*/
0x02,
0x95, /*Report Count(1)*/
0x01,
0x75, /*Report Size(5)*/
0x05,
0x81, /*Input(Constant,Array)*/
0x01,
/* 32 */
0x05, /*Usage Page(Generic Desktop)*/
0x01,
0x09, /*Usage(X axis)*/
0x30,
0x09, /*Usage(Y axis)*/
0x31,
0x09, /*Usage(Wheel)*/
0x38,
/* 40 */
0x15, /*Logical Minimum(-127)*/
0x81,
0x25, /*Logical Maximum(127)*/
0x7F,
0x75, /*Report Size(8)*/
0x08,
0x95, /*Report Count(3)*/
0x03,
/* 48 */
0x81, /*Input(Variable, Relative)*/
0x06,
0xC0, /*End Collection*/
0x09,
0x3c,
0x05,
0xff,
0x09,
/* 56 */
0x01,
0x15,
0x00,
0x25,
0x01,
0x75,
0x01,
0x95,
/* 64 */
0x02,
0xb1,
0x22,
0x75,
0x06,
0x95,
0x01,
0xb1,
/* 72 */
0x01,
0xc0
}
; /* Joystick_ReportDescriptor */
Function GetHIDReportDescriptor() must return a pointer.