Struct atsamd_hal::adc::Adc  
source · [−]pub struct Adc<ADC> { /* private fields */ }Expand description
Adc encapsulates the device ADC
Implementations
sourceimpl Adc<ADC0>
 
impl Adc<ADC0>
pub fn adc0(
    adc: ADC0,
    mclk: &mut MCLK,
    clocks: &mut GenericClockController,
    gclk: GEN_A
) -> Self
sourcepub fn samples(&mut self, samples: SampleRate)
 
pub fn samples(&mut self, samples: SampleRate)
Set the sample rate
sourcepub fn prescaler(&mut self, prescaler: Prescaler)
 
pub fn prescaler(&mut self, prescaler: Prescaler)
Set the prescaler for adjusting the clock relative to the system clock
sourcepub fn resolution(&mut self, resolution: Resolution)
 
pub fn resolution(&mut self, resolution: Resolution)
Set the input resolution
sourceimpl Adc<ADC1>
 
impl Adc<ADC1>
pub fn adc1(
    adc: ADC1,
    mclk: &mut MCLK,
    clocks: &mut GenericClockController,
    gclk: GEN_A
) -> Self
sourcepub fn samples(&mut self, samples: SampleRate)
 
pub fn samples(&mut self, samples: SampleRate)
Set the sample rate
sourcepub fn prescaler(&mut self, prescaler: Prescaler)
 
pub fn prescaler(&mut self, prescaler: Prescaler)
Set the prescaler for adjusting the clock relative to the system clock
sourcepub fn resolution(&mut self, resolution: Resolution)
 
pub fn resolution(&mut self, resolution: Resolution)
Set the input resolution
Trait Implementations
sourceimpl<C> From<Adc<ADC0>> for InterruptAdc<ADC0, C>where
    C: ConversionMode<ADC0>,
 
impl<C> From<Adc<ADC0>> for InterruptAdc<ADC0, C>where
    C: ConversionMode<ADC0>,
sourceimpl<C> From<Adc<ADC1>> for InterruptAdc<ADC1, C>where
    C: ConversionMode<ADC1>,
 
impl<C> From<Adc<ADC1>> for InterruptAdc<ADC1, C>where
    C: ConversionMode<ADC1>,
Auto Trait Implementations
impl<ADC> RefUnwindSafe for Adc<ADC>where
    ADC: RefUnwindSafe,
impl<ADC> Send for Adc<ADC>where
    ADC: Send,
impl<ADC> Sync for Adc<ADC>where
    ADC: Sync,
impl<ADC> Unpin for Adc<ADC>where
    ADC: Unpin,
impl<ADC> UnwindSafe for Adc<ADC>where
    ADC: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more