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

Pwm implementation is missing for Alternate<OpenDrain> #199

Closed
tib888 opened this issue Apr 11, 2020 · 2 comments
Closed

Pwm implementation is missing for Alternate<OpenDrain> #199

tib888 opened this issue Apr 11, 2020 · 2 comments

Comments

@tib888
Copy link

tib888 commented Apr 11, 2020

Currently the Pwm implementation works only for Alternate.
I miss the implementation for Alternate, furthermore I was not able to figure out how to fix this.
Perhaps this Alternate abstraction should become independent of outputmode, and constraints should be changed where both are needed.

@TheZoq2
Copy link
Member

TheZoq2 commented Apr 13, 2020

Hmm, from a quick skim of the datasheet, I don't see a reason for it being restricted to OpenDrain.

I believe the place where it gets set to PushPull is here: https://github.com/stm32-rs/stm32f1xx-hal/blob/master/src/pwm.rs#L111. Changing that PushPull to a generic parameter should fix the issue if I'm not misstaken

bors bot added a commit that referenced this issue Aug 17, 2021
358: Allow pullup inputs and opendrain outputs r=burrbull a=Windfisch

This fixes #321, #199 and extends on #118, and also fixes this issue for other peripherals that don't mind which pull-ups are configured for their inputs and whether their outputs are pushpull or open drain.

This is a superset of #357 and #359. Prefer this PR.

Co-authored-by: Florian Jung <flo@windfis.ch>
@Ranlvor
Copy link

Ranlvor commented Aug 12, 2023

I think this issue can be closed. I am using PWM in OpenDrain-Mode and it works fine.

#358 even says that it fixed this issue.

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

4 participants