[][src]Struct tsic::Tsic

pub struct Tsic<I: InputPin> { /* fields omitted */ }

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]

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

impl<I> Sync for Tsic<I> where
    I: Sync

impl<I> Unpin for Tsic<I> where
    I: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.