Closed NOP0 closed 3 years ago
This is a branch of #29, I'm not sure if you prefer to merge that first?
I just did a rebase and merge of #29 so this branch should be able to make progress. Do you think it's worth testing on real hardware before merging? Or could we hit merge without it?
Do you think it's worth testing on real hardware before merging? Or could we hit merge without it?
Started working on gpio output, but just realized that outputs are not implemented in ProcessImage
Ooops :laughing:
I'll need to implement that first.
@Michael-F-Bryan Ok, did some more on this...The gpio-example now logs TRUE∕FALSE when I put voltage on the input pin, and I can measure a toggling voltage on the output pin. Do you have access to a Raspberry PI, should we double-check this?
I've read a bit on how the embedded guys do this stuff; https://rust-embedded.github.io/book/static-guarantees/design-contracts.html
Their approach might be better, thinking of redoing this like in the link. Thoughts?
I have looked a bit at the embedded-hal traits also, and for gpio I believe we can be "conformant" without any hassle. I'm on my phone, so no code to show for though.
@Michael-F-Bryan Rewrote process image to use proper types instead of "DoubleWord" and so on.
What do you think of c0f1bdc ? Is it ok to match on adress, or should this be more generic, so that any type which implements PiAccess
could update the process image? I'm not sure how I would do that though :smile:
FWIW we're able to read a GPIO on a Raspberry PI 2B in real life. Writing is not done/tested yet, I have to get some more hardware. This is a branch of #29 , I'm not sure if you prefer to merge that first?