pub enum I2cStep {
Write {
address: u8,
bytes: Vec<u8>,
},
Read {
address: u8,
reply: Vec<u8>,
},
WriteRead {
address: u8,
bytes: Vec<u8>,
reply: Vec<u8>,
},
Fault {
address: u8,
kind: ErrorKind,
},
}Expand description
One transfer a scripted I2C part expects, and what it answers.
Variants§
Write
The driver writes exactly bytes to address.
Fields
Read
The driver reads from address and receives reply, whose length is the
length it must ask for.
Fields
WriteRead
The driver writes bytes then reads reply.len() bytes from address in one
transaction, the shape of a register read.
Fields
Fault
The part fails the next transfer to address with kind, the way a missing
or busy part does.
Implementations§
Trait Implementations§
impl Eq for I2cStep
impl StructuralPartialEq for I2cStep
Auto Trait Implementations§
impl Freeze for I2cStep
impl RefUnwindSafe for I2cStep
impl Send for I2cStep
impl Sync for I2cStep
impl Unpin for I2cStep
impl UnsafeUnpin for I2cStep
impl UnwindSafe for I2cStep
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