Skip to main content

AdcPin

Struct AdcPin 

Source
pub struct AdcPin { /* private fields */ }
Expand description

GPIO pin that can be used as an ADC input channel.

This struct is used because there is a bit of setup needed to configure the pin for ADC usage. In theory, at some point in the future, we could reset this to GPIO use on drop.

Implementations§

Source§

impl AdcPin

Source

pub fn new<'d, P: AdcInputPin>(pin: Peri<'d, P>) -> Self

Takes ownership of a pin for ADC use.

Auto Trait Implementations§

§

impl Forget for AdcPin

§

impl Freeze for AdcPin

§

impl Move for AdcPin

§

impl RefUnwindSafe for AdcPin

§

impl Send for AdcPin

§

impl Sync for AdcPin

§

impl Unpin for AdcPin

§

impl UnsafeUnpin for AdcPin

§

impl UnwindSafe for AdcPin

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.