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

Make GPIOs start in a Disconnected state #220

Merged
merged 2 commits into from
Sep 12, 2020
Merged

Make GPIOs start in a Disconnected state #220

merged 2 commits into from
Sep 12, 2020

Conversation

jonas-schievink
Copy link
Contributor

@jonas-schievink jonas-schievink commented Sep 11, 2020

This should fix #213 by making all GPIO pins start in a new Disconnected state that does not implement any of the embedded-hal traits and needs to be converted to a functional state first.

I've also implemented Channel<Saadc> for all GPIO type states (even output states), which should be correct according to the GPIO schematics in the manual. Using a pin as a SAADC channel will fully switch the pin from the GPIO circuitry to the analog circuitry. This avoids breaking code that passes an uninitialized pin to the SAADC.

@jamesmunns jamesmunns merged commit a31fdd5 into nrf-rs:master Sep 12, 2020
@jonas-schievink jonas-schievink deleted the pin-reset-disconnected branch September 12, 2020 08:11
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.

gpio port not actually Floating
2 participants