Struct stm32_hal2::adc::Adc [−][src]
Analog Digital Converter Peripheral
Implementations
impl Adc<ADC1>
[src]
pub fn new_adc1_unchecked<C: ClockCfg>(
regs: ADC1,
adc_common: &mut ADC_COMMON,
ckmode: ClockMode,
clocks: &C,
rcc: &mut RCC
) -> Self
[src]
regs: ADC1,
adc_common: &mut ADC_COMMON,
ckmode: ClockMode,
clocks: &C,
rcc: &mut RCC
) -> 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
pub fn setup_oneshot(&mut self)
[src]
sets up adc in one shot mode for a single channel
Trait Implementations
impl<WORD, PIN> OneShot<ADC1, WORD, PIN> for Adc<ADC1> where
WORD: From<u16>,
PIN: Channel<ADC1, ID = u8>,
[src]
WORD: From<u16>,
PIN: Channel<ADC1, ID = u8>,
Auto Trait Implementations
impl<ADC> Send for Adc<ADC> where
ADC: Send,
ADC: Send,
impl<ADC> Sync for Adc<ADC> where
ADC: Sync,
ADC: Sync,
impl<ADC> Unpin for Adc<ADC> where
ADC: Unpin,
ADC: 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>,