Struct bmp280_rs::BMP280 [−][src]
Implementations
impl<I2C, E, Mode> BMP280<I2C, Mode> where
I2C: WriteRead<Error = E> + Write<Error = E>,
E: Debug,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
E: Debug,
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]
I2C: WriteRead<Error = E> + Write<Error = E>,
E: Debug,
pub fn into_sleep_mode(
self,
i2c: &mut I2C
) -> Result<BMP280<I2C, ModeSleep>, Error>
[src]
self,
i2c: &mut I2C
) -> Result<BMP280<I2C, ModeSleep>, Error>
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]
I2C: WriteRead<Error = E> + Write<Error = E>,
E: Debug,
pub fn new(
i2c: &mut I2C,
i2c_address: I2CAddress,
config: Config
) -> Result<Self, Error>
[src]
i2c: &mut I2C,
i2c_address: I2CAddress,
config: Config
) -> Result<Self, Error>
pub fn into_normal_mode(
self,
i2c: &mut I2C
) -> Result<BMP280<I2C, ModeNormal>, Error>
[src]
self,
i2c: &mut I2C
) -> Result<BMP280<I2C, ModeNormal>, Error>
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]
I2C: RefUnwindSafe,
Mode: RefUnwindSafe,
impl<I2C, Mode> Send for BMP280<I2C, Mode> where
I2C: Send,
Mode: Send,
[src]
I2C: Send,
Mode: Send,
impl<I2C, Mode> Sync for BMP280<I2C, Mode> where
I2C: Sync,
Mode: Sync,
[src]
I2C: Sync,
Mode: Sync,
impl<I2C, Mode> Unpin for BMP280<I2C, Mode> where
I2C: Unpin,
Mode: Unpin,
[src]
I2C: Unpin,
Mode: Unpin,
impl<I2C, Mode> UnwindSafe for BMP280<I2C, Mode> where
I2C: UnwindSafe,
Mode: UnwindSafe,
[src]
I2C: UnwindSafe,
Mode: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,