Struct imxrt_hal::adc::AnalogInput [−][src]
A pin representing an analog input for a particular ADC
Implementations
impl<P, ADCx> AnalogInput<ADCx, P> where
P: Pin<ADCx>,
ADCx: ADC,
[src]
P: Pin<ADCx>,
ADCx: ADC,
pub fn new(pin: P) -> Self
[src]
Creates a new analog input pin
pub fn release(self) -> P
[src]
Release the ADC input, returning the underlying hardware pin. This pin is in an unspecified state
Trait Implementations
impl<P, ADCx> Channel<ADCx> for AnalogInput<ADCx, P> where
P: Pin<ADCx>,
ADCx: ADC,
[src]
P: Pin<ADCx>,
ADCx: ADC,
impl<ADCx, WORD, P> OneShot<ADCx, WORD, AnalogInput<ADCx, P>> for ADC<ADCx> where
ADCx: ADC,
WORD: From<u16>,
P: Pin<ADCx>,
[src]
ADCx: ADC,
WORD: From<u16>,
P: Pin<ADCx>,
Implement embedded-hal traits
type Error = Infallible
Error type returned by ADC methods
fn read(&mut self, _pin: &mut AnalogInput<ADCx, P>) -> Result<WORD, Self::Error>
[src]
Read an ADC value from an AnalogInput. This should always return a good result
Auto Trait Implementations
impl<ADCx, P> Send for AnalogInput<ADCx, P> where
ADCx: Send,
P: Send,
ADCx: Send,
P: Send,
impl<ADCx, P> Sync for AnalogInput<ADCx, P> where
ADCx: Sync,
P: Sync,
ADCx: Sync,
P: Sync,
impl<ADCx, P> Unpin for AnalogInput<ADCx, P> where
ADCx: Unpin,
P: Unpin,
ADCx: Unpin,
P: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,