[−][src]Struct tsic::Tsic
The Tsic
struct is the main entry point when trying to get a temperature reading from a
TSIC 306 sensor.
Implementations
impl<I: InputPin> Tsic<I>
[src]
pub fn new(pin: I) -> Self
[src]
Creates a new Tsic
sensor wrapper and binds it to the input pin given.
pub fn read<D: DelayUs<u8>>(
&self,
delay: &mut D
) -> Result<Temperature, TsicReadError>
[src]
&self,
delay: &mut D
) -> Result<Temperature, TsicReadError>
Attempts to read from the sensor, might fail (see errors for details if so).
Note that the passed in Delay
from the HAL needs to be aquired outside of
this struct and passed in as mutable, because to aquire correct data from the
sensor the code needs to pause for a certain amount of microseconds.
Auto Trait Implementations
impl<I> Send for Tsic<I> where
I: Send,
I: Send,
impl<I> Sync for Tsic<I> where
I: Sync,
I: Sync,
impl<I> Unpin for Tsic<I> where
I: Unpin,
I: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,