Skip to content

Make GPIOs start in a Disconnected state#220

Merged
jamesmunns merged 2 commits intonrf-rs:masterfrom
jonas-schievink:pin-reset-disconnected
Sep 12, 2020
Merged

Make GPIOs start in a Disconnected state#220
jamesmunns merged 2 commits intonrf-rs:masterfrom
jonas-schievink:pin-reset-disconnected

Conversation

@jonas-schievink
Copy link
Copy Markdown
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