pub struct InitializedBMP180<T, D> { /* private fields */ }Expand description
Represents an initialized version of the sensor.
Implementations§
Source§impl<T: I2c, D: DelayNs> InitializedBMP180<T, D>
impl<T: I2c, D: DelayNs> InitializedBMP180<T, D>
Sourcepub fn temperature(&mut self) -> Result<f32, CustomError<T::Error>>
pub fn temperature(&mut self) -> Result<f32, CustomError<T::Error>>
Measures temperature.
Sourcepub fn pressure(
&mut self,
resolution: Resolution,
) -> Result<i32, CustomError<T::Error>>
pub fn pressure( &mut self, resolution: Resolution, ) -> Result<i32, CustomError<T::Error>>
Measures pressure.
Sourcepub fn altitude(
&mut self,
resolution: Resolution,
) -> Result<f32, CustomError<T::Error>>
pub fn altitude( &mut self, resolution: Resolution, ) -> Result<f32, CustomError<T::Error>>
Calculates altitude.
Sourcepub fn read_all(
&mut self,
resolution: Resolution,
) -> Result<(f32, i32, f32), CustomError<T::Error>>
pub fn read_all( &mut self, resolution: Resolution, ) -> Result<(f32, i32, f32), CustomError<T::Error>>
Reads all data including temperature, pressure, and altitude.
Trait Implementations§
Source§impl<T: I2c, D: DelayNs> Common<T> for InitializedBMP180<T, D>
impl<T: I2c, D: DelayNs> Common<T> for InitializedBMP180<T, D>
Source§fn read_chip_id(&mut self) -> Result<u8, CustomError<T::Error>>
fn read_chip_id(&mut self) -> Result<u8, CustomError<T::Error>>
Reads the chip identifier.
The returned value is hardcoded by the manufacturer and should be equivalent to 0x55.
Source§fn check_connection(&mut self) -> Result<(), CustomError<T::Error>>
fn check_connection(&mut self) -> Result<(), CustomError<T::Error>>
Tests the connection to the device. Read more
Auto Trait Implementations§
impl<T, D> Freeze for InitializedBMP180<T, D>
impl<T, D> RefUnwindSafe for InitializedBMP180<T, D>where
T: RefUnwindSafe,
D: RefUnwindSafe,
impl<T, D> Send for InitializedBMP180<T, D>
impl<T, D> Sync for InitializedBMP180<T, D>
impl<T, D> Unpin for InitializedBMP180<T, D>
impl<T, D> UnwindSafe for InitializedBMP180<T, D>where
T: 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