AsyncDevice

Trait AsyncDevice 

Source
pub trait AsyncDevice: Device {
    type Err;

    // Required methods
    async fn delay_us_async(&mut self, us: u32);
    async fn flush_async(&mut self) -> Result<(), Self::Err>;

    // Provided methods
    async fn write_nibble_async(
        &mut self,
        mode: RegisterSelectMode,
        data: u8,
    ) -> Result<(), Self::Err> { ... }
    async fn write_byte_async(
        &mut self,
        mode: RegisterSelectMode,
        byte: u8,
    ) -> Result<(), Self::Err> { ... }
}
Available on crate feature async only.

Required Associated Types§

Required Methods§

Source

async fn delay_us_async(&mut self, us: u32)

Source

async fn flush_async(&mut self) -> Result<(), Self::Err>

Provided Methods§

Source

async fn write_nibble_async( &mut self, mode: RegisterSelectMode, data: u8, ) -> Result<(), Self::Err>

Source

async fn write_byte_async( &mut self, mode: RegisterSelectMode, byte: u8, ) -> Result<(), Self::Err>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<I, D, P> AsyncDevice for I2cExpanderDevice<I, D, P>
where I: I2c, D: DelayNs, P: I2cPacketAssembler,

Available on crate feature i2c-expander-device-async and (crate features i2c-expander-device or i2c-expander-device-async) only.
Source§

type Err = <I as ErrorType>::Error