[][src]Struct hx711::Hx711

pub struct Hx711<D, IN, OUT> { /* fields omitted */ }

HX711 driver

Implementations

impl<D, IN, OUT, EIN, EOUT> Hx711<D, IN, OUT> where
    D: DelayUs<u32>,
    IN: InputPin<Error = EIN>,
    OUT: OutputPin<Error = EOUT>, 
[src]

pub fn new(delay: D, dout: IN, pd_sck: OUT) -> Result<Self, Error<EIN, EOUT>>[src]

Creates a new driver from Input and Outut pins

pub fn get_mode(&self) -> Mode[src]

Get the mode (channel and gain).

pub fn set_mode(&mut self, mode: Mode) -> Result<(), Error<EIN, EOUT>>[src]

Set the mode (channel and gain).

pub fn disable(&mut self) -> Result<(), Error<EIN, EOUT>>[src]

Put the chip in power down state.

pub fn enable(&mut self) -> Result<(), Error<EIN, EOUT>>[src]

Wake the chip up and set mode.

pub fn reset(&mut self) -> Result<(), Error<EIN, EOUT>>[src]

Reset the chip.

pub fn retrieve(&mut self) -> Result<i32, Error<EIN, EOUT>>[src]

Retrieve the latest conversion value if available

Auto Trait Implementations

impl<D, IN, OUT> Send for Hx711<D, IN, OUT> where
    D: Send,
    IN: Send,
    OUT: Send

impl<D, IN, OUT> Sync for Hx711<D, IN, OUT> where
    D: Sync,
    IN: Sync,
    OUT: Sync

impl<D, IN, OUT> Unpin for Hx711<D, IN, OUT> where
    D: Unpin,
    IN: Unpin,
    OUT: 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.