Closed Michael-F-Bryan closed 4 years ago
I'm surprised how it was to make the naive Device
implementation. If you ignore all the cruft from #4, all of the implementation fit into a single, rather straightforward commit (a2d93e6).
I'm not satisfied with how the GpioPin
is constructed though. It assumes you've already got an InputNumber
(or OutputNumber
), but until now we've never even talked about where that'll come from. There's a good chance we'll run into a chicken-and-egg problem... GpioPin
requires an InputNumber
, but you only get that after the GpioPin
has been constructed and told the IO system which inputs and outputs it uses.
Yes, it's was quite clean to implement a new device. Nice solution with the Registrar trait. Promising! :+1: Yeah, I agree there's a chicken and egg-problem there.
This builds on top of the
Device
code from #4 to implement aDevice
that uses the Linux GPIO interface under the hood.