Commit graph

290 commits

Author SHA1 Message Date
Kevin Mehall
1f7a58700f
Merge pull request #57 from kevinmehall/windows-interfaces
windows: Allow claiming interfaces that require WinUsb_GetAssociatedInterface
2024-07-28 14:01:50 -06:00
Kevin Mehall
58b5b583f7 rust 1.80: ignore warning for cfg(fuzzing) 2024-07-28 13:58:39 -06:00
Kevin Mehall
4ddd81b8f1 windows: Obtain serial number from ioctl instead of instance ID
The instance ID is capitalized if the string descriptor contains
lower case characters, and also uses a generated ID in place
of the actual serial number if the serial number is a duplicate.
2024-07-28 13:52:57 -06:00
Kevin Mehall
905313e704 windows: List interfaces using descriptor if driver is not usbccgp 2024-07-28 13:52:57 -06:00
Kevin Mehall
d5ec7144ff windows: Allow claiming interfaces that require WinUsb_GetAssociatedInterface 2024-07-28 13:52:52 -06:00
Kevin Mehall
e47fbf3ac6 v0.1.10 2024-07-27 14:44:15 -06:00
Kevin Mehall
70c64d06a8
Merge pull request #67 from kevinmehall/iokit-numbers
macos: Fix enumeration of devices where bus number > 0x80
2024-07-26 19:51:26 -06:00
Kevin Mehall
e361ae79fa Show location ID and registry entry ID in hex in debug format 2024-07-26 18:46:16 -07:00
Kevin Mehall
6b1f182d3c macos: Convert iokit number properties with wrapping as.
32-bit values such as locationID are always encoded as
kCFNumberSInt32Type where large values are returned
as negative numbers that fail in `try_from`.
2024-07-26 18:36:17 -07:00
Ryan Butler
ca8b2edc9a
Rewrite to not use RAII 2024-07-23 18:40:06 -04:00
Ryan Butler
984c3b1bc7
implement equivalent to libusb_detach_kernel_driver 2024-07-23 16:24:19 -04:00
Kevin Mehall
bcab2875f0
Merge pull request #63 from martinling/error-operation-aborted
Handle `ERROR_OPERATION_ABORTED` result when a transfer is cancelled
2024-07-09 21:20:00 -06:00
Martin Ling
d42ad0673d Handle ERROR_OPERATION_ABORTED result when a transfer is cancelled.
Seen on Windows 10 while shutting down a bulk Queue.
2024-07-09 20:53:42 +01:00
Kevin Mehall
50e022b433
Merge pull request #62 from martinling/declare-msrv
Declare minimum supported rust version as 1.74, and test this in CI
2024-07-03 11:20:11 -06:00
Martin Ling
d81e1acd5f CI: Test with MSRV (1.74) and latest stable Rust. 2024-07-03 16:16:37 +01:00
Martin Ling
cceb4bc9cb Declare minimum supported rust version as 1.74.
This minimum is imposed by the use of OsStr::as_encoded_bytes in
platform/linux_usbfs/enumeration.rs.
2024-07-03 16:01:30 +01:00
Kevin Mehall
1c7db04e54
Merge pull request #56 from kevinmehall/superspeed
windows: Fix speed detection for SuperSpeed and SuperSpeed+
2024-06-01 16:24:52 -06:00
Kevin Mehall
28f9aa71a2 windows: Fix speed detection for SuperSpeed and SuperSpeed+
These were misdetected as high speed and Windows requires
IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2 to detect them.

Co-authored-by: wangxiaochuTHU <wangxiaochu@tsinghua.org.cn>
2024-06-01 12:15:50 -06:00
Kevin Mehall
4aa30603db
Merge pull request #55 from baloo/baloo/fixup-bulk-out
fixup `bulk_out_queue` documentation
2024-05-29 08:11:46 -06:00
Arthur Gautier
c20d2d7d02 fixup bulk_out_queue documentation 2024-05-28 21:59:24 -07:00
Kevin Mehall
38aee4a698 v0.1.9 2024-04-28 18:16:57 -06:00
Kevin Mehall
878fe5f76d
Merge pull request #51 from kevinmehall/interface-descriptor
Add Interface::{interface_number, descriptors}
2024-04-28 18:15:23 -06:00
Kevin Mehall
8916126e04 Add Interface::{interface_number, descriptors} 2024-04-28 17:50:10 -06:00
Kevin Mehall
84ddf9091d Consistent naming of platform interface fields 2024-04-28 17:50:10 -06:00
Kevin Mehall
85f7645b38 Extend lifetime of descriptors 2024-04-28 16:51:44 -06:00
Kevin Mehall
fe17c187d3 macos: Don't panic on invalid endpoint 2024-04-28 15:41:03 -07:00
Kevin Mehall
d1072b063e
Merge pull request #50 from alexmoon/mac-alt-setting
Mac: Update endpoints when interface alt setting is changed
2024-04-24 23:39:57 -06:00
Alex Moon
4adf6114bb Refine mutex spans 2024-04-24 14:50:30 -04:00
Alex Moon
134b654f96 Mac: Update endpoints when interface alt setting is changed
The set of available endpoints can change when an interface's alt setting is changed, so on Mac we need to refresh our cached set of endpoints.
2024-04-23 16:42:18 -04:00
Kevin Mehall
3a7bfe097b v0.1.8 2024-04-21 11:11:49 -06:00
Kevin Mehall
dae0db79bd Fix non-public doc comment 2024-04-21 11:11:39 -06:00
Kevin Mehall
40f27ccf16 Fix RequestBuffer::reuse
The bug leads to a transfer writing out-of-bounds if
`RequestBuffer::reuse` is called with a larger `len` than the passed
Vec's capacity.

Fixes #49
2024-04-21 10:32:30 -06:00
Kevin Mehall
3b6e5cdbcc v0.1.7 2024-03-03 15:01:10 -07:00
Kevin Mehall
3a26de9499 Docs edits 2024-03-03 12:21:46 -07:00
Kevin Mehall
0a9b493bae
Merge pull request #46 from kevinmehall/clear-halt
Add Interface::clear_halt
2024-03-03 11:18:56 -07:00
Kevin Mehall
083eb65a2d Add Queue::clear_halt 2024-03-03 10:51:05 -07:00
Kevin Mehall
59a17c817c windows: fix set_alt_setting 2024-03-03 10:37:10 -07:00
Kevin Mehall
94621931a2 Add Interface::clear_halt 2024-03-03 10:37:10 -07:00
Kevin Mehall
2379cb1b2c
Merge pull request #45 from kevinmehall/winusb-control-interface
Document and warn on case where WinUSB changes the passed control transfer index field to the interface number
2024-03-02 22:29:15 -07:00
Kevin Mehall
63809b97be Document and warn on case where WinUSB changes the passed control transfer index field to the interface number 2024-03-02 21:23:56 -07:00
Kevin Mehall
f057627390
Merge pull request #44 from jonlamb-gh/update-ioctl-code
Cast RawOpcode to the internal ioctl_code type (c_uint)
2024-03-02 13:36:07 -07:00
Jon Lamb
9e8a6e01ea
Cast RawOpcode to the internal ioctl_code type
The rustix `RawOpcode` type can vary depending on the target.
For example, targets that use the libc Linux configuration in rustix, the
`RawOpcode` type is a type alias to `c_ulong` rather than `c_uint`.
2024-03-01 04:36:36 -08:00
Kevin Mehall
04bc3a2cd3
Merge pull request #41 from kevinmehall/windows-lazy-find-interface
windows: Search for interface when claiming, not on device open
2024-02-25 13:17:08 -07:00
Kevin Mehall
c583caf63c windows: Search for interface when claiming, not on device open
This allows providing a better error message when failing to claim
an interface, and may fix claiming a non-zero interface when a whole
composite device is bound to WinUSB.
2024-02-25 13:12:15 -07:00
Kevin Mehall
978d686838
Merge pull request #40 from kevinmehall/log-error
Lower log level to `debug!()` for errors in enumeration.
2024-02-25 11:52:13 -07:00
Kevin Mehall
9c9993d6bb Lower log level to debug!() for errors in enumeration.
These may not invove a device the app cares about, which results
in noisy yet useless logs.
2024-02-25 11:35:22 -07:00
Kevin Mehall
e19bb416b3
Merge pull request #39 from elfmimi/singular-guid
windows: Also try to read DeviceInterfaceGUID
2024-02-25 10:16:55 -07:00
Ein Terakawa
cd4aed7932 windows: Also try to read DeviceInterfaceGUID 2024-02-24 18:25:41 +09:00
Kevin Mehall
6668fa1f21 v0.1.6 2024-02-01 22:56:29 -07:00
Kevin Mehall
edbc049854
Merge pull request #37 from cstrahan/patch-1
Fix interface string on macOS
2024-01-31 20:53:46 -07:00