In certain applications, a user may want to create an SPI bus, do some operation with the SPI, then destroy it to free the pins and peripheral.
For example, they may be working with an ADC where the parallel interface shares a clock pin with the SPI interface. To later re-use the clock pin to synchronously extract data from the parallel interface, they need to actually recover ownership of the clock pin.
I'm thinking something like rp2040-hal's Spi free():
pub fn free(self) -> (D, P)
Releases the underlying device and pins.
Is this plausible?
In certain applications, a user may want to create an SPI bus, do some operation with the SPI, then destroy it to free the pins and peripheral.
For example, they may be working with an ADC where the parallel interface shares a clock pin with the SPI interface. To later re-use the clock pin to synchronously extract data from the parallel interface, they need to actually recover ownership of the clock pin.
I'm thinking something like rp2040-hal's Spi free():
Is this plausible?