dcuddeback / libusb-rs

A safe Rust wrapper for libusb.
MIT License
199 stars 64 forks source link

Add control_transfer implementation #2

Closed r3n4ud closed 9 years ago

r3n4ud commented 9 years ago

Fix #1

dcuddeback commented 9 years ago

@nibua-r This looks good. :+1:

In #1, you mentioned that it needs tests. Unit tests for the ControlRequest struct would be helpful, but I'd be okay merging this PR without them too. I plan to add functionality for string descriptors based on your work in this PR. I'll update examples/read_device.rs to read string descriptors when I add that feature. I think that will be enough to test the control transfer, so you don't need to add anything for that in this PR. Most of the heavy logic is in the C library anyway, which I trust to be correct.

If you don't mind, I'd appreciate it if you'd squash the commits into a single commit to reduce the number of intermediate commits. You can do that with git rebase -i master and then changing pick to fixup for all but the first commit.

Thanks again for all your work on this. I really appreciate the help. I've been wanting to implement string descriptors for a while, so I'm particularly excited to see this merged. :)

r3n4ud commented 9 years ago

@dcuddeback Squash done! :+1:

r3n4ud commented 9 years ago

String descriptor features will be of great value to me! Would like any help on this?

dcuddeback commented 9 years ago

@nibua-r Thanks! I'll see how far I get with the string descriptors and then let you know.

dcuddeback commented 9 years ago

@nibua-r I finished string descriptors this weekend and published v0.1.1 to crates.io.