Skip to content

Commit

Permalink
Fix USB device enumeration on Windows 8.1 and Windows 10 (#393)
Browse files Browse the repository at this point in the history
* Remove USB 2.0 Extension from BOS descriptor.

* Declutter usb.h of unused code.

Now that I'm more confident the USB 2.0 Extensions are only required
for USB 3.0 devices, and there's less mystery around why the change
worked for us, garbage-collect the commented-out descriptor.
  • Loading branch information
jyoung8607 authored and robbederks committed Nov 27, 2019
1 parent dec565c commit 7f9b4a5
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions board/drivers/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -281,15 +281,8 @@ uint8_t binary_object_store_desc[] = {
// BOS header
BINARY_OBJECT_STORE_DESCRIPTOR_LENGTH, // bLength, this is only the length of the header
BINARY_OBJECT_STORE_DESCRIPTOR, // bDescriptorType
0x40, 0x00, // wTotalLength (LSB, MSB)
0x03, // bNumDeviceCaps (USB 2.0 + WebUSB + WinUSB)

// -------------------------------------------------
// USB 2.0 extension descriptor
0x07, // bLength, Descriptor size
0x10, // bDescriptorType, Device Capability Descriptor Type
0x02, // bDevCapabilityType, USB 2.0 extension capability type
0x00, 0x00, 0x00, 0x00, // bmAttributes, LIBUSB_BM_LPM_SUPPORT = 2 and its the only option
0x39, 0x00, // wTotalLength (LSB, MSB)
0x02, // bNumDeviceCaps (WebUSB + WinUSB)

// -------------------------------------------------
// WebUSB descriptor
Expand Down

0 comments on commit 7f9b4a5

Please sign in to comment.