pub struct Reading { /* private fields */ }Expand description
One temperature result: the register word, with the conversions to real units.
§Examples
use pamoja_sensors::tmp117::Reading;
// Table 7-1: 25 C is 0C80h.
let reading = Reading::new(0x0C80);
assert_eq!(reading.celsius(), 25.0);
assert_eq!(reading.micro_celsius(), 25_000_000);
assert_eq!(i16::from_be_bytes(reading.to_bytes()), 0x0C80, "high byte first");Implementations§
Trait Implementations§
impl Copy for Reading
impl Eq for Reading
impl StructuralPartialEq for Reading
Auto Trait Implementations§
impl Freeze for Reading
impl RefUnwindSafe for Reading
impl Send for Reading
impl Sync for Reading
impl Unpin for Reading
impl UnsafeUnpin for Reading
impl UnwindSafe for Reading
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