Take ownership of Spi in activate_ref

This commit is contained in:
Michael Watzko 2021-04-16 01:28:27 +02:00
commit 96c6edfd81
6 changed files with 35 additions and 35 deletions

View file

@ -65,7 +65,7 @@ Usage of borrowed SPI-Bus and previously initialized `Device`:
let mut buffer = [0u8; 1024];
match device
// scoped activation & usage of the SPI bus without move
.activate_ref(&mut FourWireRef::new(&mut spi, &mut cs))
.activate_ref(FourWireRef::new(&mut spi, &mut cs))
.receive(socket, &mut buffer)
{
Ok(..) => todo!(),