Closed mvirkkunen closed 2 years ago
Hey @mvirkkunen, thank you for your effort! This PR works fine for me (though I still need to manually merge in #62 to support larger descriptors ;)). I also think that the interface is nice to use, so I'm fine :).
@mvirkkunen care to click "merge" on this?
Adds a method for writing descriptors with an unknown length in a way that's similar to how accepting control transfers works, and a method for writing endpoint descriptors with extra data in the same manner.
Unfortunately the naming is the reverse of control transfers (
write_with
takes a callback whileaccept_with
takes a buffer), but this way it's compatible.This would implement both #63 and #46. @Windfisch, if you have an audio driver going, could you test this to see if it's good for your purposes?