[−][src]Struct hx711::Hx711
HX711 driver
Methods
impl<IN, OUT> Hx711<IN, OUT> where
IN: InputPin,
OUT: OutputPin,
[src]
IN: InputPin,
OUT: OutputPin,
pub fn new(dout: IN, pd_sck: OUT) -> Self
[src]
Creates a new driver from Input and Outut pins
pub fn set_mode(&mut self, mode: Mode)
[src]
Set the mode (channel and gain).
pub fn reset(&mut self)
[src]
Reset the chip. Mode is Channel A Gain 128 after reset.
pub fn retrieve(&mut self) -> Result<i32, !>
[src]
Retrieve the latest conversion value if available
Auto Trait Implementations
impl<IN, OUT> Send for Hx711<IN, OUT> where
IN: Send,
OUT: Send,
IN: Send,
OUT: Send,
impl<IN, OUT> Sync for Hx711<IN, OUT> where
IN: Sync,
OUT: Sync,
IN: Sync,
OUT: Sync,
Blanket Implementations
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> From for T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,