1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

usb cdc: fix device descriptor to work on Mac

Apple is very particular about requiring the bDeviceClass
to be set to 2 (Commmunication Device) even for composite
devices which seems wrong.

Device is enumerated without error on Mac now.  Not sure if it
works though.
This commit is contained in:
Stacey Sheldon 2011-09-12 12:18:05 -04:00
parent 617a30c07c
commit e6ead85857

View File

@ -27,9 +27,9 @@ const uint8_t PIOS_HID_DeviceDescriptor[PIOS_HID_SIZ_DEVICE_DESC] =
USB_DEVICE_DESCRIPTOR_TYPE, // bDescriptorType
0x00, // bcdUSB
0x02,
0xEF, // bDeviceClass (Misc)
0x02, // bDeviceSubClass (common)
0x01, // bDeviceProtocol (IAD)
0x02, // bDeviceClass (Communication Device)
0x00, // bDeviceSubClass (Use Interface SubClass)
0x00, // bDeviceProtocol
0x40, // bMaxPacketSize40
(uint8_t)((PIOS_USB_VENDOR_ID) & 0xff), // idVendor
(uint8_t)((PIOS_USB_VENDOR_ID) >> 8),