OneWireStatus

Trait OneWireStatus 

Source
pub trait OneWireStatus {
    // Required methods
    fn presence(&self) -> bool;
    fn shortcircuit(&self) -> bool;

    // Provided method
    fn logic_level(&self) -> Option<bool> { ... }
}
Expand description

Trait describing the status of a 1-Wire bus. This trait is used to encapsulate the status of the bus after a reset operation.

Required Methods§

Source

fn presence(&self) -> bool

Returns true if a device is present on the bus, false otherwise.

Source

fn shortcircuit(&self) -> bool

Returns true if a short circuit is detected on the bus, false otherwise.

Provided Methods§

Source

fn logic_level(&self) -> Option<bool>

Returns the logic state of the active 1-Wire line without initiating any 1-Wire communication.

Implementors§