greatscottgadgets / apollo

microcontroller-based FPGA / JTAG programmer
BSD 3-Clause "New" or "Revised" License
61 stars 29 forks source link

firmware: add WCID descriptors #48

Closed mndza closed 4 months ago

mndza commented 4 months ago

Add Microsoft OS 1.0 descriptor for the DFU runtime interface.

The CDC interface is recognized by Windows as a serial port already. This change makes the DFU runtime appear as a WinUSB device.

mossmann commented 4 months ago

In addition to adding WCID descriptors, this PR changes bDeviceClass from 0xEF to 0. This means that we are no longer attempting to use the Interface Association Descriptor (IAD) method of implementing a composite device and are instead using the simpler bDeviceClass = 0 method.

We previously used bDeviceClass = 0xEF which indicated IAD, but we hadn't actually implemented the required descriptors. This worked on Linux and macOS but did not work on Windows. With bDeviceClass = 0 things work on all three operating systems without any additional descriptors.