Trait Interface

Source
pub trait Interface {
    // Required methods
    fn interface_type(&self) -> CommInterface;
    fn read(&self, _reg_addr: u8, _reg_data: &mut [u8]) -> Result<(), Error>;
    fn write(&self, _reg_addr: u8, _reg_data: &[u8]) -> Result<(), Error>;
    fn delay(&self, _us: u32);
}

Required Methods§

Source

fn interface_type(&self) -> CommInterface

Communication to the bme68x device occurs over SPI or I2C.

Source

fn read(&self, _reg_addr: u8, _reg_data: &mut [u8]) -> Result<(), Error>

Function for reading the sensor’s registers through SPI bus.

Source

fn write(&self, _reg_addr: u8, _reg_data: &[u8]) -> Result<(), Error>

Function for writing the sensor’s registers through SPI bus.

Source

fn delay(&self, _us: u32)

Function for delaying in Microseconds.

Implementors§