linux-embedded-hal
linux-embedded-hal copied to clipboard
SPI `TransferInPlace` operation is unsound.
The implementation for the TransferInPlace operation violates the aliasing rule by creating an immutable reference from a mutable one, but keeping both.
https://github.com/rust-embedded/linux-embedded-hal/blob/1ffb268a71b2b5157461685cc62b325a86e41f8c/src/spi.rs#L216-L222
There needs to be a corresponding method for SpidevTransfer, e.g. read_write_in_place.