pub enum SpiStep {
Write {
bytes: Vec<u8>,
},
Read {
reply: Vec<u8>,
},
Transfer {
bytes: Vec<u8>,
reply: Vec<u8>,
},
Fault {
kind: ErrorKind,
},
}Expand description
One transfer a scripted SPI part expects, and what it answers.
Variants§
Write
The driver writes exactly bytes; whatever the part shifts out meanwhile is
discarded, as the driver asked.
Read
The driver reads reply.len() bytes and receives reply.
Transfer
The driver writes bytes and receives reply in the same clocks, so the two
are the same length.
Fields
Fault
The part fails the next transfer with kind.
Implementations§
Trait Implementations§
impl Eq for SpiStep
impl StructuralPartialEq for SpiStep
Auto Trait Implementations§
impl Freeze for SpiStep
impl RefUnwindSafe for SpiStep
impl Send for SpiStep
impl Sync for SpiStep
impl Unpin for SpiStep
impl UnsafeUnpin for SpiStep
impl UnwindSafe for SpiStep
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more