Introduce HID_API_MAX_REPORT_DESCRIPTOR_SIZE (libusb#452)#1
Merged
fengjixuchui merged 14 commits intofengjixuchui:masterfrom Sep 15, 2022
Merged
Introduce HID_API_MAX_REPORT_DESCRIPTOR_SIZE (libusb#452)#1fengjixuchui merged 14 commits intofengjixuchui:masterfrom
fengjixuchui merged 14 commits intofengjixuchui:masterfrom
Conversation
- new API function: `struct hid_device_info * hid_get_device_info(hid_device *dev);` to get `hid_device_info` after the device already opened; - reused existing implementation on Windows and macOS from enumeration routines to have the implementation; - refactored libusb implementation to have a shared routine for `hid_enumerate` and `hid_get_device_info`; - refactored hidraw implementation to have a shared routine for `hid_enumerate` and `hid_get_device_info`; Resolves: #431 Closes: #164 Closes: #163
Potential execution path may happen if kernel driver successfully detached, but libusb failed to claim the requested interface. Otherwise the device remains with detached kernel driver.
Avoid infinite reading from the device if the device doesn't send any interrupt reports. Otherwise hidtest has to be stopped by Ctrl+C interruption, which doesn't give a chance to close the device properly, as a result this has negative side-effects when using LIBUSB backed.
- pass the actual HID Report descriptor size (from HID descriptor); - interface_num has to be wIndex, and not as part of wValue for LIBUSB_DT_REPORT request;
- not an independent build system, but a wrapper over CMake; - may be used as a standalone Meson build or as a subproject;
NOTES, as described in #31: - it is still hard to use HIDAPI on OpenBSD since it is hard to use LIBUSB with HID devices; - there is a name colision with `hid_init` from `usbhid` OpenBSD library;
Check CMake build on: - Alpine - Archlinux - Fedora/mingw64 - FreeBSD
- first step is to use HID_API_MAX_REPORT_DESCRIPTOR_SIZE internally; - port a few improvements from get-descriptor branch early; Resolves: #384
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.