From 34cfba73b4a7e5c4d8d2f9e16943765e5651bd30 Mon Sep 17 00:00:00 2001 From: Ryan McClelland Date: Sat, 17 Dec 2022 11:20:37 -0800 Subject: [PATCH] usb: device: hid: correct bcdHID to v1.11 spec bcdHID is intended for the spec version of USB HID. It was pointing to the v1.1 bcdUSB define which happens to be the same value for the v1.10 hid spec version. This corrects it to use the v1.11 HID spec. Signed-off-by: Ryan McClelland --- include/zephyr/usb/class/hid.h | 3 +++ subsys/usb/device/class/hid/core.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/zephyr/usb/class/hid.h b/include/zephyr/usb/class/hid.h index db8ff47c458..95e61655ecf 100644 --- a/include/zephyr/usb/class/hid.h +++ b/include/zephyr/usb/class/hid.h @@ -33,6 +33,9 @@ extern "C" { * @{ */ +/** HID Specification release v1.11 */ +#define USB_HID_VERSION 0x0111 + /** USB HID Class HID descriptor type */ #define USB_DESC_HID 0x21 /** USB HID Class Report descriptor type */ diff --git a/subsys/usb/device/class/hid/core.c b/subsys/usb/device/class/hid/core.c index 537fbc875b7..d05fdae723e 100644 --- a/subsys/usb/device/class/hid/core.c +++ b/subsys/usb/device/class/hid/core.c @@ -82,7 +82,7 @@ struct usb_hid_config { { \ .bLength = sizeof(struct usb_hid_descriptor), \ .bDescriptorType = USB_DESC_HID, \ - .bcdHID = sys_cpu_to_le16(USB_SRN_1_1), \ + .bcdHID = sys_cpu_to_le16(USB_HID_VERSION), \ .bCountryCode = 0, \ .bNumDescriptors = 1, \ .subdesc[0] = { \