Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propose bitbang modes in the builder pattern. #9

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cr1901
Copy link
Contributor

@cr1901 cr1901 commented Apr 25, 2020

Okay, this PR I concede it's probably controversial, but I at least wanted to get a draft out the door before I stop working for the night :D.

bitbang::BitBang represents asynchronous bitbang. The carefully-named BitBang trait should be implemented for e.g. Mpsse as well.

A user can go straight into asynchronous bitbang mode from Builder::new().usb_open()?.bitbang(...)?. For MPSSE, Builder::new().usb_open()?.mpsse(...)? etc.

@tanriol
Copy link
Owner

tanriol commented Apr 27, 2020

Sorry, I haven't commented this PR yet. Yes, it is controversial, and I need to think through it to understand the consequences.

@cr1901
Copy link
Contributor Author

cr1901 commented Apr 27, 2020

Yes, it is controversial

I'm happy to live up to your expectations :P.

and I need to think through it to understand the consequences.

N.b. I'm not attached to this PR. It was pushed as a draft to start discussing a type safe way to separate the various modes an FTDI chip can be in. Feel free to make an alternate PR if you want so we can discuss.

@cr1901 cr1901 mentioned this pull request May 8, 2020
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.

2 participants