pub struct Adc<ADC> {
pub rb: ADC,
/* private fields */
}
Expand description
Analog Digital Converter Peripheral
Fields§
§rb: ADC
ADC Register
Implementations§
Source§impl Adc<ADC1>
impl Adc<ADC1>
Sourcepub fn adc1(
rb: ADC1,
adc_common: &mut ADC1_2,
ahb: &mut AHB,
ckmode: CkMode,
clocks: Clocks,
) -> Self
pub fn adc1( rb: ADC1, adc_common: &mut ADC1_2, ahb: &mut AHB, ckmode: CkMode, clocks: Clocks, ) -> Self
Init a new ADC
Enables the clock, performs a calibration and enables the ADC
§Panics
If one of the following occurs:
- the clocksetting is not well defined.
- the clock was already enabled with a different setting
Sourcepub fn setup_oneshot(&mut self)
pub fn setup_oneshot(&mut self)
sets up adc in one shot mode for a single channel
Source§impl Adc<ADC2>
impl Adc<ADC2>
Sourcepub fn adc2(
rb: ADC2,
adc_common: &mut ADC1_2,
ahb: &mut AHB,
ckmode: CkMode,
clocks: Clocks,
) -> Self
pub fn adc2( rb: ADC2, adc_common: &mut ADC1_2, ahb: &mut AHB, ckmode: CkMode, clocks: Clocks, ) -> Self
Init a new ADC
Enables the clock, performs a calibration and enables the ADC
§Panics
If one of the following occurs:
- the clocksetting is not well defined.
- the clock was already enabled with a different setting
Sourcepub fn setup_oneshot(&mut self)
pub fn setup_oneshot(&mut self)
sets up adc in one shot mode for a single channel
Source§impl Adc<ADC3>
impl Adc<ADC3>
Sourcepub fn adc3(
rb: ADC3,
adc_common: &mut ADC3_4,
ahb: &mut AHB,
ckmode: CkMode,
clocks: Clocks,
) -> Self
pub fn adc3( rb: ADC3, adc_common: &mut ADC3_4, ahb: &mut AHB, ckmode: CkMode, clocks: Clocks, ) -> Self
Init a new ADC
Enables the clock, performs a calibration and enables the ADC
§Panics
If one of the following occurs:
- the clocksetting is not well defined.
- the clock was already enabled with a different setting
Sourcepub fn setup_oneshot(&mut self)
pub fn setup_oneshot(&mut self)
sets up adc in one shot mode for a single channel
Source§impl Adc<ADC4>
impl Adc<ADC4>
Sourcepub fn adc4(
rb: ADC4,
adc_common: &mut ADC3_4,
ahb: &mut AHB,
ckmode: CkMode,
clocks: Clocks,
) -> Self
pub fn adc4( rb: ADC4, adc_common: &mut ADC3_4, ahb: &mut AHB, ckmode: CkMode, clocks: Clocks, ) -> Self
Init a new ADC
Enables the clock, performs a calibration and enables the ADC
§Panics
If one of the following occurs:
- the clocksetting is not well defined.
- the clock was already enabled with a different setting
Sourcepub fn setup_oneshot(&mut self)
pub fn setup_oneshot(&mut self)
sets up adc in one shot mode for a single channel
Trait Implementations§
Auto Trait Implementations§
impl<ADC> Freeze for Adc<ADC>where
ADC: Freeze,
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more