Trait esp_ward::peripherals::I2cPeriph

source ·
pub trait I2cPeriph {
    type Returnable;

    // Required method
    fn create_on_i2c(
        bus: I2C<'static, I2C0>,
        delay: Delay
    ) -> Result<Self::Returnable, PeripheralError>;
}
Expand description

Trait for peripherals that communicate over I2C. Implementation should provide a method for creating an instance of the peripheral on the I2C bus.

Required Associated Types§

Required Methods§

source

fn create_on_i2c( bus: I2C<'static, I2C0>, delay: Delay ) -> Result<Self::Returnable, PeripheralError>

Object Safety§

This trait is not object safe.

Implementors§