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

Allow pin modes OpenDrain and PushPull for SPI output pins #226

Merged
merged 4 commits into from
Mar 31, 2023

Conversation

osannolik
Copy link
Contributor

@osannolik osannolik commented Mar 26, 2023

I needed to use OpenDrain mode for SPI output pins, but the init for SPI were only defined for pins set to Analog (i.e. implicitly PushPull). Therefore I added Output<OpenDrain> as an alternative and also Output<PushPull> to allow for more explicit user peripheral setup code.

@osannolik osannolik requested a review from a team as a code owner March 26, 2023 14:12
Copy link
Contributor

@jamwaffles jamwaffles 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 PR! Changes look good, and according to ST AN4899 section 4.3.3:

The output buffer can be configured in open-drain or push-pull mode

This is a supported feature so we're all good.

Can you please add a changelog entry under the Additions heading?

Clippy is also whinging in CI but that looks like an easy fix. Thanks!

@osannolik osannolik requested a review from jamwaffles March 30, 2023 21:14
Copy link
Contributor

@jamwaffles jamwaffles left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@jamwaffles jamwaffles merged commit 0930a37 into stm32-rs:master Mar 31, 2023
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