pub struct Measurement {
pub pressure: u32,
pub temperature: u32,
}Expand description
The raw, uncompensated 20-bit codes from the BMP280 data registers.
Fields§
§pressure: u32The 20-bit uncompensated pressure, up[19:0].
temperature: u32The 20-bit uncompensated temperature, ut[19:0].
Implementations§
Source§impl Measurement
impl Measurement
Sourcepub fn parse(data: &[u8; 6]) -> Measurement
pub fn parse(data: &[u8; 6]) -> Measurement
Sourcepub fn to_bytes(&self) -> [u8; 6]
pub fn to_bytes(&self) -> [u8; 6]
Builds the six data bytes a device holding these codes would return.
§Returns
The bytes as they sit at 0xF7..=0xFC. Only the low 20 bits of each code are
carried.
Sourcepub fn pressure_skipped(&self) -> bool
pub fn pressure_skipped(&self) -> bool
Returns whether the pressure measurement was skipped (osrs_p = 0).
Sourcepub fn temperature_skipped(&self) -> bool
pub fn temperature_skipped(&self) -> bool
Returns whether the temperature measurement was skipped (osrs_t = 0).
Trait Implementations§
Source§impl Clone for Measurement
impl Clone for Measurement
Source§fn clone(&self) -> Measurement
fn clone(&self) -> Measurement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Measurement
Source§impl Debug for Measurement
impl Debug for Measurement
impl Eq for Measurement
Source§impl PartialEq for Measurement
impl PartialEq for Measurement
Source§fn eq(&self, other: &Measurement) -> bool
fn eq(&self, other: &Measurement) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Measurement
Auto Trait Implementations§
impl Freeze for Measurement
impl RefUnwindSafe for Measurement
impl Send for Measurement
impl Sync for Measurement
impl Unpin for Measurement
impl UnsafeUnpin for Measurement
impl UnwindSafe for Measurement
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