Skip to main content

I2cExt

Trait I2cExt 

Source
pub trait I2cExt {
    // Required method
    fn connect_to_i2c(
        &self,
        instance: &str,
    ) -> Result<Client<Device>, DriverError>;
}
Expand description

Extension trait for DriverContext to simplify connecting to I2C resources.

Required Methods§

Source

fn connect_to_i2c(&self, instance: &str) -> Result<Client<Device>, DriverError>

Connects to an I2C resource with the given instance name.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl I2cExt for DriverContext

Source§

fn connect_to_i2c(&self, instance: &str) -> Result<Client<Device>, DriverError>

Implementors§