-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit fixes the backend of reset device to restore the state of the device if possible. This fixes a bug introduced in c14ab5f. The previous commit was necessary due to changes in the system USB stack that essentially turned the ResetDevice function into a no-op. This required libusb to move to USBDevuceReEnumerate to effectively reset the device. The problem is that both the device handle and libusb devices became invalid. This commit fixes the bug by waiting for the re-enumeration to complete then 1) checking whether the descriptors changed, 2) restoring the active configuration, and 3) restoring claimed interfaces. Closes #523 Signed-off-by: Nathan Hjelm <hjelmn@me.com>
- Loading branch information
Showing
3 changed files
with
154 additions
and
53 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
#define LIBUSB_NANO 11347 | ||
#define LIBUSB_NANO 11348 |