usb-mouse: do not set bDeviceClass in the device descriptor
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 22 Sep 2010 16:57:36 +0000 (16:57 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 22 Sep 2010 16:57:36 +0000 (16:57 +0000)
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

bertos/drv/usb_mouse.c

index 401dc33168b24b372220d05ce61e9b34cd4fdc01..abf44f4a149282a8c213014a799b71629870e621 100644 (file)
@@ -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,