Struct bme680::Bme680[][src]

#[repr(C)]
pub struct Bme680<I2C, D> { /* fields omitted */ }

Driver for the BME680 environmental sensor

Implementations

impl<I2C, D> Bme680<I2C, D> where
    D: DelayMs<u8>,
    I2C: Read + Write
[src]

pub fn soft_reset(
    i2c: &mut I2C,
    delay: &mut D,
    dev_id: I2CAddress
) -> Result<(), <I2C as Read>::Error, <I2C as Write>::Error>
[src]

pub fn init(
    i2c: I2C,
    delay: &mut D,
    dev_id: I2CAddress
) -> Result<Bme680<I2C, D>, <I2C as Read>::Error, <I2C as Write>::Error>
[src]

pub fn set_sensor_settings(
    &mut self,
    delay: &mut D,
    settings: Settings
) -> Result<(), <I2C as Read>::Error, <I2C as Write>::Error>
[src]

Set the settings to be used during the sensor measurements

pub fn get_sensor_settings(
    &mut self,
    desired_settings: DesiredSensorSettings
) -> Result<SensorSettings, <I2C as Read>::Error, <I2C as Write>::Error>
[src]

Retrieve settings from sensor registers

Arguments

  • desired_settings - Settings to be retrieved. Setting values may stay None if not retrieved.

pub fn set_sensor_mode(
    &mut self,
    delay: &mut D,
    target_power_mode: PowerMode
) -> Result<(), <I2C as Read>::Error, <I2C as Write>::Error>
[src]

Set the sensor into a certain power mode

Arguments

  • target_power_mode - Desired target power mode

pub fn get_sensor_mode(
    &mut self
) -> Result<PowerMode, <I2C as Read>::Error, <I2C as Write>::Error>
[src]

Retrieve current sensor power mode via registers

pub fn bme680_set_profile_dur(&mut self, tph_sett: TphSett, duration: Duration)[src]

pub fn get_profile_dur(
    &self,
    sensor_settings: &SensorSettings
) -> Result<Duration, <I2C as Read>::Error, <I2C as Write>::Error>
[src]

pub fn get_sensor_data(
    &mut self,
    delay: &mut D
) -> Result<(FieldData, FieldDataCondition), <I2C as Read>::Error, <I2C as Write>::Error>
[src]

Retrieve the current sensor informations

Auto Trait Implementations

impl<I2C, D> RefUnwindSafe for Bme680<I2C, D> where
    D: RefUnwindSafe,
    I2C: RefUnwindSafe

impl<I2C, D> Send for Bme680<I2C, D> where
    D: Send,
    I2C: Send

impl<I2C, D> Sync for Bme680<I2C, D> where
    D: Sync,
    I2C: Sync

impl<I2C, D> Unpin for Bme680<I2C, D> where
    D: Unpin,
    I2C: Unpin

impl<I2C, D> UnwindSafe for Bme680<I2C, D> where
    D: UnwindSafe,
    I2C: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.