Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test(usb): create usb.Controller interface for testing#5110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mikesmitty wants to merge5 commits intotinygo-org:dev
base:dev
Choose a base branch
Loading
frommikesmitty:ms/usb-msc-unit-testing

Conversation

@mikesmitty
Copy link
Contributor

@mikesmittymikesmitty commentedDec 5, 2025
edited
Loading

I mentioned this in a comment on#5109, this is a small refactor of the machine and usb package interactions (and some other changes mixed in that will be created as separate PRs and rebased later on). This creates a usb.Controller interface for use in the USB-related packages for mocking in unit testing and updates machine.USBDev to implement it:

type Controller interface {ConfigureUSBEndpoint(desc descriptor.Descriptor, epSettings []EndpointConfig, setup []SetupConfig)SendUSBInPacket(ep uint32, data []byte) boolAckUsbOutTransfer(ep uint32)SendZlp()IsInitEndpointComplete() boolSetStallEPIn(ep uint32)SetStallEPOut(ep uint32)ClearStallEPIn(ep uint32)ClearStallEPOut(ep uint32)}

@mikesmittymikesmittyforce-pushed thems/usb-msc-unit-testing branch 2 times, most recently from0ce6776 to7fc576bCompareDecember 5, 2025 14:07
@mikesmittymikesmitty changed the titlerefactor(usb): create usb.Controller interface for testingtest(usb): create usb.Controller interface for testingDec 5, 2025
@deadprogram
Copy link
Member

@mikesmitty can you please resolve merge conflicts so I can help review. Thank you!

@mikesmitty
Copy link
ContributorAuthor

mikesmitty commentedDec 7, 2025
edited
Loading

I pushed up some changes to make it compatible with the change to disable USB-CDC when -serial=(uart|rtt), but the relevant nrf52840 code for example is still broken in this one. Now that the base is updated with the CSW fixes I'm back to working on that portion again though. Since this depends on changes to the nrf52840 and samd usb stacks those will need to be fixed before this one can be merged, but I'll be using this branch as the base for them for testing/debugging

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@mikesmitty@deadprogram

[8]ページ先頭

©2009-2025 Movatter.jp