-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add more ftdi wrappers #14
Conversation
What's the purpose of the |
Also, sorry, I've found a few commits I forgot to push last time that seem to conflict with some of your changes :-( |
Hi @tanriol I dropped commit adding Regards, |
I'll look at this in more detail tomorrow. One question I'm not sure about is whether the bitmodes are close enough to actually treat them as the same object. For example, IIRC, some mode(s) had hardcoded baud rates that ignored the For an even more interesting example, does it really make sense for the MPSSE mode to implement Oh, and it would be nice if the names used were more Rust-style than copied-straight-from-libftdi-style. |
Hi, Adding these functions I assume that ftdi-rs is a wrapper that exposes libftdi interface w/o API changes. So BitMode is just a wrapper for libftdi enum ftdi_mpsse_mode. Concerning the naming, I agree that Regards, |
For flow control I'd suggest By the way, do we need to reset any of these when opening the device, or does |
Add wrappers for libftdi flow control defines. Add set_flow_control wrapper for ftdi_setflowctrl function.
Add wrappers for libftdi bitmode defines. Add set_bitmode wrapper for ftdi_set_bitmode function.
Hi, I can not comment if any reset operations are needed in general on init. I guess if a specific mode has its own quirks, then they can be applied by the application using that mode. In my case I init MPSSE mode according to FTDI ANs. Regards, |
I've merged your MR and added a number of fixups on top. It would also be nice to provide documentation on its usage, but that will have to wait for later. |
This PR adds the following new Rust wrappers for libftdi functions:
This is an updated version of #2.
Regards,
Sergey