Skip to content

Control Transfer Refactor - #165

Merged
MelbourneDeveloper merged 27 commits into
developfrom
develop-controltransfer-Refactor
Nov 11, 2020
Merged

MelbourneDeveloper merged 27 commits into
developfrom
develop-controltransfer-Refactor

Conversation

@MelbourneDeveloper

Copy link
Copy Markdown
Owner

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

@MelbourneDeveloper
MelbourneDeveloper changed the base branch from master to develop November 10, 2020 20:08

public Task<ReadResult> SendControlTransferAsync(SetupPacket setupPacket, byte[] buffer, CancellationToken cancellationToken = default)
{
return buffer == null || buffer.Length == 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MelbourneDeveloper I think passing null buffers should be allowed there, use case on STM32 is when sending a "Clear Status" or "Reboot" command.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plan is to remove the buffer parameter entirely. The result will get returned.

@MelbourneDeveloper
MelbourneDeveloper merged commit 8b37092 into develop Nov 11, 2020
@MelbourneDeveloper
MelbourneDeveloper deleted the develop-controltransfer-Refactor branch November 11, 2020 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants