Trait I2cRead

Source
pub trait I2cRead: Debug {
    type Error;
    type Read: Read + Unpin;

    // Required method
    fn poll_begin_read(
        self: Pin<&mut Self>,
        cx: &mut Context<'_>,
        addr: u8,
    ) -> Poll<Result<Self::Read, Self::Error>>;
}
Expand description

A peripheral that can perform I²C read operations.

Required Associated Types§

Source

type Error

The common error type for I²C read operations.

A single error type for all operations is enforced for simplicity.

Source

type Read: Read + Unpin

An object that can be used to complete the read operation.

Required Methods§

Source

fn poll_begin_read( self: Pin<&mut Self>, cx: &mut Context<'_>, addr: u8, ) -> Poll<Result<Self::Read, Self::Error>>

Polls the start of a read operation to completion.

Implementors§