Take ownership of Spi in activate_ref
This commit is contained in:
parent
3489574603
commit
96c6edfd81
6 changed files with 35 additions and 35 deletions
|
|
@ -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!(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue