Thank you for your work on this crate. I've recently started to work with rust for embedded programming, and I've wanted to write a library for LCD peripherals (similar to the ones available for Arduino). But I've been kinda stuck with how to handle the storage of Objects representing a GPIO Pin for Data Pins. This may just be me being blind when reading the documentation, but I'm unable to access the used InputPin, OutputPin, StatefulOutputPin traits that all GPIO pins implement.
The intended usage would be to either get the pins from a dev and store them in a slice or vec on runtime. I would've tried to use something like [dyn ...Pin. 8]. ATM I'm handling this by having functions that run a match on usize ints to toggle pins with sth similar to high(pin: usize) but this isn't an efficient or portable solution. I've also tried creating an enum and implementing methods for all pins, but that has the same problems with performance and portability.
Thank you for your work on this crate. I've recently started to work with rust for embedded programming, and I've wanted to write a library for LCD peripherals (similar to the ones available for Arduino). But I've been kinda stuck with how to handle the storage of Objects representing a GPIO Pin for Data Pins. This may just be me being blind when reading the documentation, but I'm unable to access the used
InputPin
,OutputPin
,StatefulOutputPin
traits that all GPIO pins implement.The intended usage would be to either get the pins from a dev and store them in a slice or vec on runtime. I would've tried to use something like
[dyn ...Pin. 8]
. ATM I'm handling this by having functions that run amatch
on usize ints to toggle pins with sth similar tohigh(pin: usize)
but this isn't an efficient or portable solution. I've also tried creating an enum and implementing methods for all pins, but that has the same problems with performance and portability.Any help would be appreciated :)