diff options
| author | ZYH <[email protected]> | 2018-07-04 14:55:19 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-07-04 14:55:19 +0800 |
| commit | e6a34ead5d6f3bc3aa97f96f38983c557afa0288 (patch) | |
| tree | 7bc9490433c223a6e3ab06746a2f127de7b2f818 /components/drivers/usb | |
| parent | 79e9d2360dc8d27971c353a467dd36c120344390 (diff) | |
| parent | 151330b7210a9faa65e192706dd5107b9b2c5497 (diff) | |
Merge pull request #1604 from uestczyh222/master
[Components][USB][Device]Support customer HID class|支持自定义HID设备
Diffstat (limited to 'components/drivers/usb')
| -rw-r--r-- | components/drivers/usb/usbdevice/class/hid.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/components/drivers/usb/usbdevice/class/hid.c b/components/drivers/usb/usbdevice/class/hid.c index fe1050e3ef..bbaf7d23ef 100644 --- a/components/drivers/usb/usbdevice/class/hid.c +++ b/components/drivers/usb/usbdevice/class/hid.c @@ -129,6 +129,34 @@ const rt_uint8_t _report_desc[]= USAGE_MAXIMUM(1), 0x65, INPUT(1), 0x00, END_COLLECTION(0), +#if RT_USB_DEVICE_HID_KEYBOARD_NUMBER>3 + USAGE_PAGE(1), 0x01, + USAGE(1), 0x06, + COLLECTION(1), 0x01, + REPORT_ID(1), HID_REPORT_ID_KEYBOARD4, + + USAGE_PAGE(1), 0x07, + USAGE_MINIMUM(1), 0xE0, + USAGE_MAXIMUM(1), 0xE7, + LOGICAL_MINIMUM(1), 0x00, + LOGICAL_MAXIMUM(1), 0x01, + REPORT_SIZE(1), 0x01, + REPORT_COUNT(1), 0x08, + INPUT(1), 0x02, + REPORT_COUNT(1), 0x01, + REPORT_SIZE(1), 0x08, + INPUT(1), 0x01, + + REPORT_COUNT(1), 0x06, + REPORT_SIZE(1), 0x08, + LOGICAL_MINIMUM(1), 0x00, + LOGICAL_MAXIMUM(1), 0x65, + USAGE_PAGE(1), 0x07, + USAGE_MINIMUM(1), 0x00, + USAGE_MAXIMUM(1), 0x65, + INPUT(1), 0x00, + END_COLLECTION(0), +#endif #endif #endif #endif |
