Repository navigation
Control Transfer Refactor - #165
Merged
Merged
Conversation
fdidron
reviewed
Nov 11, 2020
|
|
||
| public Task<ReadResult> SendControlTransferAsync(SetupPacket setupPacket, byte[] buffer, CancellationToken cancellationToken = default) | ||
| { | ||
| return buffer == null || buffer.Length == 0 |
There was a problem hiding this comment.
@MelbourneDeveloper I think passing null buffers should be allowed there, use case on STM32 is when sending a "Clear Status" or "Reboot" command.
Owner
Author
There was a problem hiding this comment.
The plan is to remove the buffer parameter entirely. The result will get returned.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is not complete, but I'm putting this up so people can see the diff comment on the public interface. This started out with @networkfusion 's work here.
Basically, this adds a single method to the IUsbInterace interface and an extension method to IUsbInterface. It doesn't bloat the public interface much at all but does allow you to do a control transfer directly on the usb device.
Please post your feedback, and I will work on fixing this up to the point where it can be merged back in to develop.
@GMMan
@flyingoverclouds