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

GPIO: Support upper pins #51

Merged
merged 2 commits into from
May 7, 2024
Merged

Conversation

chrysn
Copy link
Contributor

@chrysn chrysn commented Apr 25, 2024

Initially, this only adds support for this in the GPIO module; the I2C and SPI module use a legacy-mode deref that ensures that everything they do goes to the lower byte. I can change those too, but it's tedious, so I'd like to first check with you whether the direction of the changes is OK.

@chrysn chrysn mentioned this pull request Apr 25, 2024
@chrysn
Copy link
Contributor Author

chrysn commented Apr 25, 2024

There is one peculiarity maybe worth discussing: The existing pin accessors are called ad[0-7]. As I understand that refers to the pin descriptions AD[0-7], but due to how on the FT2232 the interfaces are laid out, the "A" pins are just "A" pins when selecting interface A, and when interface B was selected (which has a HAL of the same type), the sam operations act on the BD[0-7] pins.

The new pins accessible are the upper byte, called "C" in the pinouts, so they are called c[0-7].

Copy link
Member

@newAM newAM left a comment

Choose a reason for hiding this comment

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

Thanks for the changes! Looks good to me!

@newAM newAM merged commit 88f8311 into ftdi-rs:main May 7, 2024
9 checks passed
@newAM
Copy link
Member

newAM commented May 7, 2024

Included in release v0.22.0

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