From 6f0b1adc14c293c05ecc0c8039b5ca516917e59e Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Sun, 6 May 2018 15:11:22 +0200 Subject: [PATCH] Fix vender specific usage page entry See: https://github.com/node-hid/node-hid/issues/258 --- .../usb_descriptor_generic_hid_report.c | 2 +- .../usb_descriptor_generic_hid_report.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/right/src/usb_descriptors/usb_descriptor_generic_hid_report.c b/right/src/usb_descriptors/usb_descriptor_generic_hid_report.c index fcac41d..9dd825f 100644 --- a/right/src/usb_descriptors/usb_descriptor_generic_hid_report.c +++ b/right/src/usb_descriptors/usb_descriptor_generic_hid_report.c @@ -3,7 +3,7 @@ #include "usb_descriptor_generic_hid_report.h" uint8_t UsbGenericHidReportDescriptor[USB_GENERIC_HID_REPORT_DESCRIPTOR_LENGTH] = { - HID_RI_USAGE_PAGE(8, USB_GENERIC_HID_REPORT_DESCRIPTOR_VENDOR_USAGE_PAGE_INDEX), + HID_RI_USAGE_PAGE(16, (0xFF00 | USB_GENERIC_HID_REPORT_DESCRIPTOR_VENDOR_USAGE_PAGE_INDEX)), HID_RI_USAGE(8, USB_GENERIC_HID_REPORT_DESCRIPTOR_VENDOR_USAGE_COLLECTION), HID_RI_COLLECTION(8, HID_RI_COLLECTION_APPLICATION), diff --git a/right/src/usb_descriptors/usb_descriptor_generic_hid_report.h b/right/src/usb_descriptors/usb_descriptor_generic_hid_report.h index b7c34be..d69a66c 100644 --- a/right/src/usb_descriptors/usb_descriptor_generic_hid_report.h +++ b/right/src/usb_descriptors/usb_descriptor_generic_hid_report.h @@ -3,12 +3,12 @@ // Macros: - #define USB_GENERIC_HID_REPORT_DESCRIPTOR_LENGTH 33 + #define USB_GENERIC_HID_REPORT_DESCRIPTOR_LENGTH 34 - #define USB_GENERIC_HID_REPORT_DESCRIPTOR_VENDOR_USAGE_PAGE_INDEX 0x80 - #define USB_GENERIC_HID_REPORT_DESCRIPTOR_VENDOR_USAGE_COLLECTION 0x81 - #define USB_GENERIC_HID_REPORT_DESCRIPTOR_VENDOR_USAGE_DATA_IN 0x82 - #define USB_GENERIC_HID_REPORT_DESCRIPTOR_VENDOR_USAGE_DATA_OUT 0x83 + #define USB_GENERIC_HID_REPORT_DESCRIPTOR_VENDOR_USAGE_PAGE_INDEX 0x00 + #define USB_GENERIC_HID_REPORT_DESCRIPTOR_VENDOR_USAGE_COLLECTION 0x01 + #define USB_GENERIC_HID_REPORT_DESCRIPTOR_VENDOR_USAGE_DATA_IN 0x02 + #define USB_GENERIC_HID_REPORT_DESCRIPTOR_VENDOR_USAGE_DATA_OUT 0x03 // Variables: