pub struct Tmp117<T, E> { /* private fields */ }Expand description
The TMP117 driver. Note that the alert pin is not used in this driver, see the async implementation if you want the driver to use the alert pin in the drive
Implementations§
Source§impl<T, E> Tmp117<T, E>
impl<T, E> Tmp117<T, E>
Sourcepub fn new_from_ll(tmp_ll: Tmp117LL<T, E>) -> Self
pub fn new_from_ll(tmp_ll: Tmp117LL<T, E>) -> Self
Create a new tmp117 from a low level tmp117 driver
Sourcepub fn reset<D>(&mut self, delay: &mut D) -> Result<(), Error<E>>where
D: DelayNs,
pub fn reset<D>(&mut self, delay: &mut D) -> Result<(), Error<E>>where
D: DelayNs,
Resets the device and put it in shutdown
Sourcepub fn write_eeprom(&mut self, values: [u16; 3]) -> Result<(), Error<E>>
pub fn write_eeprom(&mut self, values: [u16; 3]) -> Result<(), Error<E>>
Write data to user eeprom. Note that this is blocking because we wait for write on the eeprom to complete
Sourcepub fn oneshot(&mut self, average: Average) -> Result<f32, Error<E>>
pub fn oneshot(&mut self, average: Average) -> Result<f32, Error<E>>
Wait for data and read the temperature in celsius and shutdown since it’s a oneshot
Sourcepub fn continuous<F>(
&mut self,
config: ContinuousConfig,
f: F,
) -> Result<(), Error<E>>
pub fn continuous<F>( &mut self, config: ContinuousConfig, f: F, ) -> Result<(), Error<E>>
Pass a config and closure for the continuous mode. The device gets set to continuous, then the function is called with the handler and finally the device is shutdown
Auto Trait Implementations§
impl<T, E> Freeze for Tmp117<T, E>where
T: Freeze,
impl<T, E> RefUnwindSafe for Tmp117<T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<T, E> Send for Tmp117<T, E>
impl<T, E> Sync for Tmp117<T, E>
impl<T, E> Unpin for Tmp117<T, E>
impl<T, E> UnwindSafe for Tmp117<T, E>where
T: UnwindSafe,
E: 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