CalibrationRegisters

Struct CalibrationRegisters 

Source
pub struct CalibrationRegisters {
Show 18 fields pub dig_t1: u16, pub dig_t2: i16, pub dig_t3: i16, pub dig_p1: u16, pub dig_p2: i16, pub dig_p3: i16, pub dig_p4: i16, pub dig_p5: i16, pub dig_p6: i16, pub dig_p7: i16, pub dig_p8: i16, pub dig_p9: i16, pub dig_h1: u8, pub dig_h2: i16, pub dig_h3: u8, pub dig_h4: i16, pub dig_h5: i16, pub dig_h6: i8,
}

Fields§

§dig_t1: u16§dig_t2: i16§dig_t3: i16§dig_p1: u16§dig_p2: i16§dig_p3: i16§dig_p4: i16§dig_p5: i16§dig_p6: i16§dig_p7: i16§dig_p8: i16§dig_p9: i16§dig_h1: u8§dig_h2: i16§dig_h3: u8§dig_h4: i16§dig_h5: i16§dig_h6: i8

Implementations§

Source§

impl CalibrationRegisters

Source

pub fn compensate_temperature(&self, adc_t: i32) -> i32

Source

pub fn compensate_humidity(&self, adc_h: u16, t_fine: i32) -> u32

Source

pub fn compensate_pressure(&self, adc_p: u32, t_fine: i32) -> u32

Trait Implementations§

Source§

impl From<[u8; 33]> for CalibrationRegisters

Source§

fn from(value: [u8; 33]) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.