Struct embedded_hal_compat::Forward
source · pub struct Forward<T, M = ()> { /* private fields */ }
Expand description
Forward compatibility container object. This is generic over different E-H types and will provide adaption depending on the bound type.
Implementations§
Trait Implementations§
source§impl<T> DelayNs for Forward<T>
impl<T> DelayNs for Forward<T>
source§fn delay_ns(&mut self, ns: u32)
fn delay_ns(&mut self, ns: u32)
Pauses execution for at minimum
ns
nanoseconds. Pause can be longer
if the implementation requires it due to precision/timing issues.source§impl<T, E> ErrorType for Forward<T, ForwardInputPin>
impl<T, E> ErrorType for Forward<T, ForwardInputPin>
source§impl<T, E> ErrorType for Forward<T, ForwardIoPin>
impl<T, E> ErrorType for Forward<T, ForwardIoPin>
source§impl<T, E> ErrorType for Forward<T, ForwardOutputPin>
impl<T, E> ErrorType for Forward<T, ForwardOutputPin>
source§impl<T, E> I2c for Forward<T>where
T: Write<Error = E> + WriteIter<Error = E> + Read<Error = E> + WriteRead<Error = E> + WriteIterRead<Error = E> + Transactional<Error = E> + TransactionalIter<Error = E>,
E: Debug,
impl<T, E> I2c for Forward<T>where
T: Write<Error = E> + WriteIter<Error = E> + Read<Error = E> + WriteRead<Error = E> + WriteIterRead<Error = E> + Transactional<Error = E> + TransactionalIter<Error = E>,
E: Debug,
source§fn write(
&mut self,
address: SevenBitAddress,
words: &[u8]
) -> Result<(), Self::Error>
fn write( &mut self, address: SevenBitAddress, words: &[u8] ) -> Result<(), Self::Error>
Writes bytes to slave with address
address
. Read moresource§fn write_read(
&mut self,
address: SevenBitAddress,
bytes: &[u8],
buffer: &mut [u8]
) -> Result<(), Self::Error>
fn write_read( &mut self, address: SevenBitAddress, bytes: &[u8], buffer: &mut [u8] ) -> Result<(), Self::Error>
Writes bytes to slave with address
address
and then reads enough bytes to fill read
in a
single transaction. Read moresource§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
source§impl<T, E> InputPin for Forward<T, ForwardInputPin>
impl<T, E> InputPin for Forward<T, ForwardInputPin>
source§impl<T, E> InputPin for Forward<T, ForwardIoPin>
impl<T, E> InputPin for Forward<T, ForwardIoPin>
source§impl<T, E> OutputPin for Forward<T, ForwardIoPin>
impl<T, E> OutputPin for Forward<T, ForwardIoPin>
source§impl<T, E> OutputPin for Forward<T, ForwardOutputPin>
impl<T, E> OutputPin for Forward<T, ForwardOutputPin>
source§impl<T, E> SpiBus for Forward<T>
impl<T, E> SpiBus for Forward<T>
source§fn read(&mut self, words: &mut [u8]) -> Result<(), Self::Error>
fn read(&mut self, words: &mut [u8]) -> Result<(), Self::Error>
Read
words
from the slave. Read moresource§fn write(&mut self, words: &[u8]) -> Result<(), Self::Error>
fn write(&mut self, words: &[u8]) -> Result<(), Self::Error>
Write
words
to the slave, ignoring all the incoming words. Read moresource§fn transfer(&mut self, read: &mut [u8], write: &[u8]) -> Result<(), Self::Error>
fn transfer(&mut self, read: &mut [u8], write: &[u8]) -> Result<(), Self::Error>
Write and read simultaneously.
write
is written to the slave on MOSI and
words received on MISO are stored in read
. Read moresource§impl<T, E> Write for Forward<T>
Available on crate feature embedded-io
only.
impl<T, E> Write for Forward<T>
Available on crate feature
embedded-io
only.source§fn write(&mut self, words: &[u8]) -> Result<usize, Self::Error>
fn write(&mut self, words: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
source§fn flush(&mut self) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
Flush this output stream, blocking until all intermediately buffered contents reach their destination.
Auto Trait Implementations§
impl<T, M> Freeze for Forward<T, M>where
T: Freeze,
impl<T, M> RefUnwindSafe for Forward<T, M>where
T: RefUnwindSafe,
M: RefUnwindSafe,
impl<T, M> Send for Forward<T, M>
impl<T, M> Sync for Forward<T, M>
impl<T, M> Unpin for Forward<T, M>
impl<T, M> UnwindSafe for Forward<T, M>where
T: UnwindSafe,
M: UnwindSafe,
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