pub struct Bme680<I2C, D> { /* private fields */ }Expand description
Sensor driver
Implementations§
Source§impl<I2C, D> Bme680<I2C, D>
impl<I2C, D> Bme680<I2C, D>
Sourcepub fn new(
i2c_interface: I2C,
device_address: DeviceAddress,
delayer: D,
sensor_config: &Configuration,
ambient_temperature: i32,
) -> Result<Self, BmeError<I2C>>
pub fn new( i2c_interface: I2C, device_address: DeviceAddress, delayer: D, sensor_config: &Configuration, ambient_temperature: i32, ) -> Result<Self, BmeError<I2C>>
Creates a new instance of the Sensor
§Arguments
delayer- Used to wait for the triggered measurement to finishambient_temperature- Needed to calculate the heater target temperature
Sourcepub fn into_inner(self) -> I2C
pub fn into_inner(self) -> I2C
Returns the wrapped i2c interface
pub fn set_configuration( &mut self, config: &Configuration, ) -> Result<(), BmeError<I2C>>
Sourcepub fn measure(&mut self) -> Result<MeasurmentData, BmeError<I2C>>
pub fn measure(&mut self) -> Result<MeasurmentData, BmeError<I2C>>
Trigger a new measurement.
§Errors
If no new data is generated in 5 tries a Timeout error is returned.
pub fn get_calibration_data(&self) -> &CalibrationData
Auto Trait Implementations§
impl<I2C, D> Freeze for Bme680<I2C, D>
impl<I2C, D> RefUnwindSafe for Bme680<I2C, D>where
I2C: RefUnwindSafe,
D: RefUnwindSafe,
impl<I2C, D> Send for Bme680<I2C, D>
impl<I2C, D> Sync for Bme680<I2C, D>
impl<I2C, D> Unpin for Bme680<I2C, D>
impl<I2C, D> UnwindSafe for Bme680<I2C, D>where
I2C: UnwindSafe,
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more