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

Add StatefulOutputPin and ToggleableOutputPin #25

Merged
merged 3 commits into from
Nov 14, 2019

Conversation

Sh3Rm4n
Copy link
Member

@Sh3Rm4n Sh3Rm4n commented Nov 13, 2019

I tested it on the STM32F303 / STM32DISCOVERY Board, with the method provided in the example.

@Sh3Rm4n
Copy link
Member Author

Sh3Rm4n commented Nov 14, 2019

NOTE: I shamelessly stole the implementation from https://github.com/stm32-rs/stm32f1xx-hal.
As this is, as of my understanding, a generic method to read out the state of the pin, this should work for every stm32 gpio register.

@dfrankland
Copy link
Member

This looks great. I'll be looking to get this in once we test out and merge #21 since it has some hefty changes to gpio.rs.

Copy link
Member

@dfrankland dfrankland left a comment

Choose a reason for hiding this comment

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

I was able to test blinking successfully using an example here: dfrankland/proton-c@8b02d2f

Building all device features was successful as well.

examples/toggle.rs Outdated Show resolved Hide resolved
examples/toggle.rs Outdated Show resolved Hide resolved
src/prelude.rs Outdated Show resolved Hide resolved
Copy link
Member

@dfrankland dfrankland left a comment

Choose a reason for hiding this comment

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

Another small change

examples/toggle.rs Outdated Show resolved Hide resolved
@Sh3Rm4n Sh3Rm4n force-pushed the stateful branch 2 times, most recently from d5a0f86 to 136e126 Compare November 14, 2019 18:29
@Sh3Rm4n
Copy link
Member Author

Sh3Rm4n commented Nov 14, 2019

Applied change requests. Ready for review again :)

@dfrankland dfrankland merged commit 35c6c2d into stm32-rs:master Nov 14, 2019
@dfrankland
Copy link
Member

Nice work 🎉

@Sh3Rm4n Sh3Rm4n deleted the stateful branch November 14, 2019 19:06
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.

None yet

2 participants