-
Notifications
You must be signed in to change notification settings - Fork 398
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
RFC: add hid_get_report_descriptor API function #451
Conversation
- macOS implementation; - libusb: based on LIBUSB_REQUEST_GET_DESCRIPTOR/LIBUSB_DT_REPORT; - hidraw: based on HIDIOCGRDESC; - windows: based on HIDP_PREPARSED_DATA reverse-engineer/reconstruction; Author: JoergAtGithub <64457745+JoergAtGithub@users.noreply.github.com> Author: Ihor Dutchak <ihor.youw@gmail.com>
…_in_get_descriptor
…escriptor Merge 0.12.0 master into get-descriptor branch
- first step is to use HID_API_MAX_REPORT_DESCRIPTOR_SIZE internally; - port a few improvements from get-descriptor branch early;
# Conflicts: # hidapi/hidapi.h # hidtest/test.c # libusb/hid.c # linux/hid.c
Merge changes from master into get-descriptor branch
Hey @Youw! Nice PR! I wanted to test it with a bunch of game controllers that I have and prepare tests for them. How to generate those |
The main discussion is under #249. |
@DJm00n I just opened PR #467 for the There are basically 3 restrictions with this approach:
is logically the same as:
because the preparsed data contain only the logical relevant information, we can only assume, how it looked byte-wise
-- |
Co-authored-by: JoergAtGithub <64457745+JoergAtGithub@users.noreply.github.com>
Co-authored-by: JoergAtGithub <64457745+JoergAtGithub@users.noreply.github.com>
Add a small command line tool for Windows, which dumps the content of the `Preparsed Data` structure, provided by the Windows HID subsystem, into a file. The generated file is in a text format, which is readable for human, as by the `hid_report_reconstructor_test.exe` unit test executable of the HIDAPI project. This unit test allows it to test the HIDAPI's report descriptor reconstructor - offline, without the hardware device connected.
and solve the merge conflicts
Just FYI of others that #343 and #467 have been integrated in the following feature branch. More test results here: |
- effectively used to run (unit)tests on Windows with ASAN checks;
- fix for incorrect collection sorting and final bit padding;
Add a Testcase, using the data of the "Xbox One For Windows" controller provided: #501 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been a long way to get at this point.
Thanks everyone.
I'll keep this PR for a couple of days. If no objections/issues found - I'll merge it to master after that.
This is a major improvement for HIDAPI. Just wondering if you want to start the process to release version 0.14. Thanks. |
Release - not right now. |
Resolves: #249