Open tmh-alex opened 4 months ago
@tmh-alex i pushed a possible way out of some of the issues to this branch. I couldn't test it because i can't access the hardware at the moment. But basically:
not tested!
@washed Thanks for the inputs! I'm afraid it doesn't work though. Moving pin into the struct was one of my attempts as well. At least I now learned more about move
.
@washed If you don't mind, may I ask you to open a new branch on top of this one for your changes just like you did on the volume buttons PR? I would like to push through with my own attempts here while following your hints and suggestions (like the debounce
crate, nice one). Thanks :slightly_smiling_face:
Okay, you can try putting the pin into an Rc or Arc (make sure to clone it once to increment the reference counter), if the issue is the pin getting dropped.
Sorry for pushing on your branch, I was in a hurry. Will fix later.
@washed I started on the interrupts and ofc I ran into problems. Maybe you can point me to how to move on...?
Multiple problems here:
I could just adapt the existing implementation to use
poll_interrupt
, usingset_async_interrupt
, however, is more educational :)