[][src]Struct ds18b20::Ds18b20

pub struct Ds18b20 { /* fields omitted */ }

Implementations

impl Ds18b20[src]

pub fn new<E>(address: Address) -> OneWireResult<Ds18b20, E>[src]

Checks that the given address contains the correct family code, reads configuration data, then returns a device

pub fn address(&self) -> &Address[src]

Returns the device address

pub fn start_temp_measurement<T, E>(
    &self,
    onewire: &mut OneWire<T>,
    delay: &mut impl DelayUs<u16>
) -> OneWireResult<(), E> where
    T: InputPin<Error = E>,
    T: OutputPin<Error = E>, 
[src]

Starts a temperature measurement for just this device You should wait for the measurement to finish before reading the measurement. The amount of time you need to wait depends on the current resolution configuration

pub fn read_data<T, E>(
    &self,
    onewire: &mut OneWire<T>,
    delay: &mut impl DelayUs<u16>
) -> OneWireResult<SensorData, E> where
    T: InputPin<Error = E>,
    T: OutputPin<Error = E>, 
[src]

pub fn set_config<T, E>(
    &self,
    alarm_temp_low: i8,
    alarm_temp_high: i8,
    resolution: Resolution,
    onewire: &mut OneWire<T>,
    delay: &mut impl DelayUs<u16>
) -> OneWireResult<(), E> where
    T: InputPin<Error = E>,
    T: OutputPin<Error = E>, 
[src]

pub fn save_to_eeprom<T, E>(
    &self,
    onewire: &mut OneWire<T>,
    delay: &mut impl DelayUs<u16>
) -> OneWireResult<(), E> where
    T: InputPin<Error = E>,
    T: OutputPin<Error = E>, 
[src]

pub fn recall_from_eeprom<T, E>(
    &self,
    onewire: &mut OneWire<T>,
    delay: &mut impl DelayUs<u16>
) -> OneWireResult<(), E> where
    T: InputPin<Error = E>,
    T: OutputPin<Error = E>, 
[src]

Auto Trait Implementations

impl Send for Ds18b20

impl Sync for Ds18b20

impl Unpin for Ds18b20

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.