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

CBUSx GPIO support #50

Closed
chrysn opened this issue Apr 24, 2024 · 1 comment
Closed

CBUSx GPIO support #50

chrysn opened this issue Apr 24, 2024 · 1 comment

Comments

@chrysn
Copy link
Contributor

chrysn commented Apr 24, 2024

For use with the mikroe USB click adapter, it would be quite convenient to have GPIO support for the FT2232H BC pin family: as far as I understand, its BCBUS[1..4] pins should be usable as GPIO pins -- at least, that's how they are used on this particular board. Then, ftdi-embedded-hal could be directly used to develop embedded drivers from the comfort of a Linux environment.

If you don't get around to implementing it, I'd also appreciate any useful hints for when I try to implement this myself.

By the way: Thanks for providing this crate. It solves a long-standing dilemma I've been facing, which I can now resolve by just writing applications on embedded-hal, and run it on this crate, on an equivalent crate for other similar chips, or on kernel peripherals through linux-embedded-hal, as long as I'm not writing a kernel driver (which I am not) -- it implements the "Using a library to abstract away kernel-native or FTDI GPIO/SPI" route.

chrysn added a commit to chrysn-pull-requests/ftdi-embedded-hal that referenced this issue Apr 25, 2024
@chrysn
Copy link
Contributor Author

chrysn commented Apr 25, 2024

With #51, port BCBUS3 can be accessed like this:

    let device_b = ftdi::find_by_vid_pid(0x0403, 0x6010)
        .interface(ftdi::Interface::B)
        .open()
        .unwrap();
    let hal_b = hal::FtHal::init_default(device_b).unwrap();
    let mut pin = hal_b.c3().unwrap();

chrysn added a commit to chrysn-pull-requests/ftdi-embedded-hal that referenced this issue Apr 25, 2024
@chrysn chrysn changed the title BCBUSx GPIO support CBUSx GPIO support Apr 28, 2024
@newAM newAM closed this as completed in 88f8311 May 7, 2024
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

No branches or pull requests

1 participant