DS9097E

Struct DS9097E 

Source
pub struct DS9097E { /* private fields */ }

Implementations§

Source§

impl DS9097E

Source

pub fn new<S>(path: S) -> Result<Self>
where S: AsRef<str> + Display,

Source

pub fn enable_power(&mut self) -> Result<()>

Source

pub fn disable_power(&mut self) -> Result<()>

Trait Implementations§

Source§

impl BusManage for DS9097E

Source§

fn close(&mut self)

Source§

impl BusReadWrite for DS9097E

Source§

fn reset(&mut self) -> Result<bool>

Reset the 1-Wire bus. Returns true if a presence pulse is detected.

Source§

fn read_bit(&mut self) -> Result<bool>

Source§

fn write_bit(&mut self, bit: bool) -> Result<()>

Source§

fn read_byte(&mut self) -> Result<u8>

Source§

fn write_byte(&mut self, write: u8) -> Result<()>

Source§

fn read_bytes(&mut self, n: usize) -> Result<Vec<u8>>

Source§

fn write_bytes(&mut self, v: Vec<u8>) -> Result<()>

Source§

impl BusSearch for DS9097E

Source§

fn select(&mut self, rom: &RomId) -> Result<()>

Send a Match ROM command to select a specific device
Source§

fn directory_regular(&mut self) -> Result<Vec<RomId>>

Source§

fn directory_alarm(&mut self) -> Result<Vec<RomId>>

Source§

fn search(&mut self, search_type: u8) -> Result<Vec<RomId>>

General 1-wire search for all devices (regular or alarm) Since the bus master is error-prone, try 3 times before returning an error
Source§

fn search_next( &mut self, state: &mut ROMSearchState, search_type: u8, ) -> Result<bool>

Source§

impl BusSpawn for DS9097E

Source§

fn spawn<T, F>(path: String, factory: F) -> BusHandle
where T: BusThread + Send + 'static, F: FnOnce(String) -> Result<T> + Send + 'static,

create the bus thread Read more
Source§

impl BusThread for DS9097E

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V