pub enum Part {
Bytes(I2cPart),
Words(Box<WordPart>),
Commands(CommandPart),
}Expand description
A simulated part of any of the three kinds, as a simulated bus holds it.
A word part carries two maps of 256 sixteen-bit registers, four times what a byte part
holds, so it is boxed to keep every Part the size of the smaller two.
Variants§
Bytes(I2cPart)
A part whose registers are a byte wide.
Words(Box<WordPart>)
A part whose registers are sixteen bits wide.
Commands(CommandPart)
A part that takes commands.
Implementations§
Trait Implementations§
Source§impl From<CommandPart> for Part
Available on crate feature alloc only.
impl From<CommandPart> for Part
Available on crate feature
alloc only.Source§fn from(part: CommandPart) -> Part
fn from(part: CommandPart) -> Part
Converts to this type from the input type.
Source§impl I2c for Part
Available on crate feature alloc only.
impl I2c for Part
Available on crate feature
alloc only.Source§fn transaction(
&mut self,
address: SevenBitAddress,
operations: &mut [Operation<'_>],
) -> Result<(), Self::Error>
fn transaction( &mut self, address: SevenBitAddress, operations: &mut [Operation<'_>], ) -> Result<(), Self::Error>
Execute the provided operations on the I2C bus. Read more
Auto Trait Implementations§
impl Freeze for Part
impl RefUnwindSafe for Part
impl Send for Part
impl Sync for Part
impl Unpin for Part
impl UnsafeUnpin for Part
impl UnwindSafe for Part
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