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.
* https://github.com/japaric/embedded-hal/issues/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!
I'm going to close this as I'll be adding additional unrelated commits to my master branch - and it looks like there's another take on more fully featured gpio in the works :)
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. * https://github.com/japaric/embedded-hal/issues/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!