[][src]Struct mcp3xxx::Reading

pub struct Reading { /* fields omitted */ }

The raw reading obtained from the ADC.

Methods

impl Reading[src]

pub fn value(&self) -> u16[src]

The raw value read from the ADC, from 0 to $range - 1.

pub fn range(&self) -> u16[src]

The range of the value, the maximum possible value.

pub fn as_fraction(&self) -> f64[src]

The raw value interpreted as a fraction.

Auto Trait Implementations

impl Unpin for Reading

impl Sync for Reading

impl Send for Reading

impl RefUnwindSafe for Reading

impl UnwindSafe for Reading

Blanket Implementations

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.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]