Ads7828

Struct Ads7828 

Source
pub struct Ads7828<I2C, Delay>
where I2C: Read + Write, Delay: DelayMs<u8>,
{ /* private fields */ }

Implementations§

Source§

impl<I2C, E, Delay> Ads7828<I2C, Delay>
where I2C: Read<Error = E> + Write<Error = E>, Delay: DelayMs<u8>,

Source

pub fn new( i2c: I2C, delay: Delay, address: u8, internal_ref: bool, vdd: f32, ) -> Self

Source

pub fn read_channel(&mut self, ch: Channel) -> Result<f32, E>

Auto Trait Implementations§

§

impl<I2C, Delay> Freeze for Ads7828<I2C, Delay>
where I2C: Freeze, Delay: Freeze,

§

impl<I2C, Delay> RefUnwindSafe for Ads7828<I2C, Delay>
where I2C: RefUnwindSafe, Delay: RefUnwindSafe,

§

impl<I2C, Delay> Send for Ads7828<I2C, Delay>
where I2C: Send, Delay: Send,

§

impl<I2C, Delay> Sync for Ads7828<I2C, Delay>
where I2C: Sync, Delay: Sync,

§

impl<I2C, Delay> Unpin for Ads7828<I2C, Delay>
where I2C: Unpin, Delay: Unpin,

§

impl<I2C, Delay> UnwindSafe for Ads7828<I2C, Delay>
where I2C: UnwindSafe, Delay: UnwindSafe,

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, 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.