Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firmware: add WCID descriptors #48

Merged
merged 1 commit into from
May 6, 2024

Conversation

mndza
Copy link
Contributor

@mndza mndza commented Apr 16, 2024

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.

@antoinevg antoinevg mentioned this pull request Apr 16, 2024
@mndza mndza changed the title firmware: add WICD descriptors firmware: add WCID descriptors Apr 16, 2024
@mossmann mossmann self-requested a review April 17, 2024 15:09
Copy link
Member

@mossmann mossmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've requested a comment change, but otherwise this looks perfect!

firmware/src/mcu/samd11/usb_descriptors.c Outdated Show resolved Hide resolved
@mossmann
Copy link
Member

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.

Copy link
Member

@mossmann mossmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful! Thank you!

@mossmann mossmann merged commit 4554c56 into greatscottgadgets:main May 6, 2024
3 checks passed
@mossmann mossmann mentioned this pull request May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants