SdMmcSpi::acquire should consume self, not use &mut ref
Currently SdMmcSpi::acquire returns a BlockSpi object which contains a mutable reference to the SdMmcSpi. This is a construct that is very hard to work with. I'm reading parts of a file inside an interrupt, so I have to keep alive both a SdMmcSpi and a BlockSpi. Moreover the SdMmcSpi has to be placed in a static variable so that it is not moved once the BlockSpi is constructed. This is quite hard to use. I believe it would be easier if the SdMmcSpi would be moved inside BlockSpi.
Honestly, reading from a filesystem in an interrupt sounds like a nightmare. Personally I would set a flag and deal with that in the main loop. But aside from that, dealing with ownership transfer is not necessarily easier than handling mutable references - it just changes things.
Freel free to propose a PR to change how it works, or you could fork the library to better suit your needs.
This would make it hard to re-acquire the BlockDeviceSPI in case of some error. I've wrapped the BlockDeviceSpi in a handle which makes it a bit easier to work with: https://github.com/gauteh/sfy/blob/main/sfy-buoy/src/storage/mod.rs#L204, depends on #63 .
Closed by #80