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

Minimal change to allow support of HID descriptors #17

Merged
merged 1 commit into from
Apr 13, 2021

Conversation

mubes
Copy link
Contributor

@mubes mubes commented Apr 7, 2021

This is a minimum, conservative, change set extracted from #6 to allow the addition (as binary blobs) of HID Report Descriptors. These do not contain their type in the first octet so the existing mechanisms don't work. With this PR a HID Report Descriptor can be attached directly to a DeviceDescriptorCollection provided it's HID Descriptor has been attached to an interface. A typical configuration would be;

interface.add_subordinate_descriptor(b"\x09\x21\x11\x01\x00\x01\x22\x21\x00")
descriptors.add_descriptor(b"\x06\x00\xFF\x09\x01\xA1\x01\x15\x00\x26\xFF\x00\x75\x08\x95\x40\x09\x01\x81"
    b"\x02\x95\x40\x09\x01\x91\x02\x95\x01\x09\x01\xB1\x02\xC0",descriptor_type=0x22)

I don't think this is a complete solution to support HIDs, but it does allow them to be used today while the issues in the above PR are resolved.

@ktemkin ktemkin merged commit 9fecaac into greatscottgadgets:master Apr 13, 2021
@ktemkin
Copy link
Contributor

ktemkin commented Apr 13, 2021

That works. :)

Thanks!

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.

2 participants