{ UsagePage(USB_HID_GENERIC_DESKTOP), Usage(USB_HID_KEYBOARD), Collection(USB_HID_APPLICATION), // // Modifier keys. // 8 - 1 bit values indicating the modifier keys (ctrl, shift...) // ReportSize(1), ReportCount(8), UsagePage(USB_HID_USAGE_KEYCODES), UsageMinimum(224), UsageMaximum(231), LogicalMinimum(0), LogicalMaximum(1), Input(USB_HID_INPUT_DATA | USB_HID_INPUT_VARIABLE | USB_HID_INPUT_ABS), // // One byte of rsvd data required by HID spec. // ReportCount(1), ReportSize(8), Input(USB_HID_INPUT_CONSTANT), // // Keyboard LEDs. // 5 - 1 bit values. // ReportCount(5), ReportSize(1),
static const unsigned char g_pucMouseReportDescriptor[]= { UsagePage(USB_HID_GENERIC_DESKTOP), Usage(USB_HID_MOUSE), Collection(USB_HID_APPLICATION), Usage(USB_HID_POINTER), Collection(USB_HID_PHYSICAL), // // The buttons. // UsagePage(USB_HID_BUTTONS), UsageMinimum(1), UsageMaximum(3), LogicalMinimum(0), LogicalMaximum(1), // // 3 - 1 bit values for the buttons. // ReportSize(1), ReportCount(3), Input(USB_HID_INPUT_DATA | USB_HID_INPUT_VARIABLE | USB_HID_INPUT_ABS), // // 1 - 5 bit unused constant value to fill the 8 bits. // ReportSize(5), ReportCount(1), Input(USB_HID_INPUT_CONSTANT | USB_HID_INPUT_ARRAY |
// // 3 8-bit absolute values. // ReportSize(8), ReportCount(3), Input(USB_HID_INPUT_DATA | USB_HID_INPUT_VARIABLE | USB_HID_INPUT_ABS), // // The 8 buttons. // UsagePage(USB_HID_BUTTONS), UsageMinimum(1), UsageMaximum(8), LogicalMinimum(0), LogicalMaximum(1), PhysicalMinimum(0), PhysicalMaximum(1), // // 8 - 1 bit values for the buttons. // ReportSize(1), ReportCount(8), Input(USB_HID_INPUT_DATA | USB_HID_INPUT_VARIABLE | USB_HID_INPUT_ABS), EndCollection, EndCollection };