Struct bmp280_rs::BMP280[][src]

pub struct BMP280<I2C, Mode> { /* fields omitted */ }

Implementations

impl<I2C, E, Mode> BMP280<I2C, Mode> where
    I2C: WriteRead<Error = E> + Write<Error = E>,
    E: Debug
[src]

pub fn into_reset(self, i2c: &mut I2C) -> Result<BMP280<I2C, ModeSleep>, Error>[src]

Reset the chip into sleep mode and reconfigure it with the current config.

impl<I2C, E> BMP280<I2C, ModeNormal> where
    I2C: WriteRead<Error = E> + Write<Error = E>,
    E: Debug
[src]

pub fn into_sleep_mode(
    self,
    i2c: &mut I2C
) -> Result<BMP280<I2C, ModeSleep>, Error>
[src]

Change into sleep mode

pub fn read_raw_pressure(&mut self, i2c: &mut I2C) -> Result<u32, Error>[src]

Read the uncompensated pressure data. 20 bit value.

pub fn read_raw_temperature(&mut self, i2c: &mut I2C) -> Result<u32, Error>[src]

Read the uncompensated temperature data. 20 bit value.

pub fn read_pressure(&mut self, i2c: &mut I2C) -> Result<i32, Error>[src]

Read the compensated pressure.

pub fn read_temperature(&mut self, i2c: &mut I2C) -> Result<i32, Error>[src]

Read the compensated temperature.

impl<I2C, E> BMP280<I2C, ModeSleep> where
    I2C: WriteRead<Error = E> + Write<Error = E>,
    E: Debug
[src]

pub fn new(
    i2c: &mut I2C,
    i2c_address: I2CAddress,
    config: Config
) -> Result<Self, Error>
[src]

pub fn into_normal_mode(
    self,
    i2c: &mut I2C
) -> Result<BMP280<I2C, ModeNormal>, Error>
[src]

Convert into normal mode.

Normal mode continuously samples.

pub fn trigger_measurement(&self, i2c: &mut I2C) -> Result<(), Error>[src]

Trigger a "forced" mode single measurement.

Device internally returns to sleep mode after measurement is complete and then the pressure / temperature can be read.

pub fn read_raw_pressure(&mut self, i2c: &mut I2C) -> Result<u32, Error>[src]

Read the uncompensated pressure data. 20 bit value.

Call trigger_measurement before calling this. NB You need to allow time for the measurement to complete!

pub fn read_raw_temperature(&mut self, i2c: &mut I2C) -> Result<u32, Error>[src]

Read the uncompensated temperature data. 20 bit value.

Call trigger_measurement before calling this. NB You need to allow time for the measurement to complete!

pub fn read_pressure(&mut self, i2c: &mut I2C) -> Result<i32, Error>[src]

Read the compensated pressure.

Call trigger_measurement before calling this. NB You need to allow time for the measurement to complete!

pub fn read_temperature(&mut self, i2c: &mut I2C) -> Result<i32, Error>[src]

Read the compensated temperature.

Call trigger_measurement before calling this. NB You need to allow time for the measurement to complete!

Auto Trait Implementations

impl<I2C, Mode> RefUnwindSafe for BMP280<I2C, Mode> where
    I2C: RefUnwindSafe,
    Mode: RefUnwindSafe
[src]

impl<I2C, Mode> Send for BMP280<I2C, Mode> where
    I2C: Send,
    Mode: Send
[src]

impl<I2C, Mode> Sync for BMP280<I2C, Mode> where
    I2C: Sync,
    Mode: Sync
[src]

impl<I2C, Mode> Unpin for BMP280<I2C, Mode> where
    I2C: Unpin,
    Mode: Unpin
[src]

impl<I2C, Mode> UnwindSafe for BMP280<I2C, Mode> where
    I2C: UnwindSafe,
    Mode: UnwindSafe
[src]

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

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.