From: arighi Date: Wed, 22 Sep 2010 16:57:36 +0000 (+0000) Subject: usb-mouse: do not set bDeviceClass in the device descriptor X-Git-Tag: 2.6.0~138 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;ds=inline;h=fec685638a3874280ab768bd4f5ddab3dac3a0ed;p=bertos.git usb-mouse: do not set bDeviceClass in the device descriptor Do not explicitly set the bDeviceClass attribute to USB_CLASS_HID for usb-mouse device. Even if this would be compliant with USB standards, some OSes (e.g., Mac OS X) don't properly recognize the device as a valid USB mouse. Setting the value to 0 fixes the problem. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4263 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/drv/usb_mouse.c b/bertos/drv/usb_mouse.c index 401dc331..abf44f4a 100644 --- a/bertos/drv/usb_mouse.c +++ b/bertos/drv/usb_mouse.c @@ -73,7 +73,7 @@ static usb_device_descriptor_t usb_hid_device_descriptor = .bLength = sizeof(usb_hid_device_descriptor), .bDescriptorType = USB_DT_DEVICE, .bcdUSB = 0x100, - .bDeviceClass = USB_CLASS_HID, + .bDeviceClass = 0, .bDeviceSubClass = 0, .bDeviceProtocol = 0, .idVendor = USB_HID_VENDOR_ID,