a1ien / rusb

A safe Rust wrapper for libusb.
Other
401 stars 83 forks source link

bLength, bDescriptorType and wTotalLength to descriptors #185

Closed tuna-f1sh closed 10 months ago

tuna-f1sh commented 10 months ago

Adds getters for bLength, bDescriptorType and wTotalLength to descriptors. Includes them in list devices lsusb verbose example to make it more feature complete.

Is there a reason these are not present and I'm missing it? Rather than ask in an issue I thought it's more productive to add them and ask here.

tuna-f1sh commented 10 months ago

The macOS test fails on master so is unrelated. Seems to be something to do with libusb1-sys.

a1ien commented 10 months ago

The macOS is related to issues inside libusb itself. This bug will be fixed only in 1.0.27. LGTM. I am also not remember why this fields is not exposed.