This repository has been archived by the owner on Feb 13, 2019. It is now read-only.
refactor gpio to allow configuring individual pins, add missing pins #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey @japaric :)
I recently have been working on a project using blue-pill that requires more fine-grained control over individual GPIO pins and access to more pins than are currently defined (a keypad for a door entry system). As a result I have taken a swing at changes to allow for this.
I tried to align with your suggested * gpio API for embedded_hal, having separate traits for Input and Output. However, most of the new code handles the various configuration options, so I wasn't sure what you had envisioned.
* rust-embedded/embedded-hal#11
One thing I was wondering about was the selection of the original set of pins. Were they chosen to avoid conflict with pins used by other peripherals? I have only finished enumerating port B pins, but can add pins for the other ports unless there is a reason not to.
If you have some time to review or have any suggestions / input please let me know. Thanks!