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§
Sourcefn interface_type(&self) -> CommInterface
fn interface_type(&self) -> CommInterface
Communication to the bme68x device occurs over SPI or I2C.
Sourcefn read(&self, _reg_addr: u8, _reg_data: &mut [u8]) -> Result<(), Error>
fn read(&self, _reg_addr: u8, _reg_data: &mut [u8]) -> Result<(), Error>
Function for reading the sensor’s registers through SPI bus.