PinNotAvailable(): how to drop and reinit pin?
mateusz-szczyrzyca opened this issue · 1 comments
Hello,
First of all, thanks for working on that crate.
I need to reinitialize pins from time to time (live config reload). So normally I read from pins, but after reload,
I want to "clean" everything and initialize again (same pins)
Current code throws the following error in such scenario: PinNotAvailable(NUM)
- I fully understand, I checked the source code, but I didn't find the clear way how to "reset" pin.
I tried drop() for gpio
and IoPin
but that didn't help with this. Still same issue.
So my question is: what's the simplest way to "drop/reset/release" pin and init again?
Thanks in advance,
Ok, I realized one thread was keeping gpio reading in the background, so that's why it wasn't dropped. Closing.