pub fn adc12(
    adc1: ADC1,
    adc2: ADC2,
    delay: &mut impl DelayUs<u8>,
    prec: rec::Adc12,
    clocks: &CoreClocks,
) -> (Adc<ADC1, Disabled>, Adc<ADC2, Disabled>) {
    // Consume ADC register block, produce ADC1/2 with default settings
    let mut adc1 = Adc::<ADC1, Disabled>::default_from_rb(adc1);
    let mut adc2 = Adc::<ADC2, Disabled>::default_from_rb(adc2);

    // Check adc_ker_ck_input
    check_clock(&prec, clocks);

    // Enable AHB clock
    let prec = prec.enable();

    // Power Down
    adc1.power_down();
    adc2.power_down();

    // Reset peripheral
    prec.reset();

    // Power Up, Preconfigure and Calibrate
    adc1.power_up(delay);
    adc2.power_up(delay);
    adc1.preconfigure();
    adc2.preconfigure();
    adc1.calibrate();
    adc2.calibrate();

    (adc1, adc2)
}
/// Initialise ADC12 together
///
/// Sets all configurable parameters to one-shot defaults,
/// performs a boot-time calibration.
Initialise ADC12 together
Sets all configurable parameters to one-shot defaults,
performs a boot-time calibration.
Initialise ADC12 together Sets all configurable parameters to one - shot defaults performs a boot - time calibration .
pub fn adc12(
    adc1: ADC1,
    adc2: ADC2,
    delay: &mut impl DelayUs<u8>,
    prec: rec::Adc12,
    clocks: &CoreClocks,
) -> (Adc<ADC1, Disabled>, Adc<ADC2, Disabled>) {
    // Consume ADC register block, produce ADC1/2 with default settings
    let mut adc1 = Adc::<ADC1, Disabled>::default_from_rb(adc1);
    let mut adc2 = Adc::<ADC2, Disabled>::default_from_rb(adc2);
    // Check adc_ker_ck_input
    check_clock(&prec, clocks);
    // Enable AHB clock
    let prec = prec.enable();
    // Power Down
    adc1.power_down();
    adc2.power_down();
    // Reset peripheral
    prec.reset();
    // Power Up, Preconfigure and Calibrate
    adc1.power_up(delay);
    adc2.power_up(delay);
    adc1.preconfigure();
    adc2.preconfigure();
    adc1.calibrate();
    adc2.calibrate();
    (adc1, adc2)
}
pub fn adc12 ( adc1 : ADC1 , adc2 : ADC2 , delay : & mut impl DelayUs < u8 > , prec : rec :: Adc12 , clocks : & CoreClocks , ) -> ( Adc < ADC1 , Disabled > , Adc < ADC2 , Disabled > ) { // Consume ADC register block, produce ADC1/2 with default settings let mut adc1 = Adc :: < ADC1 , Disabled > :: default_from_rb ( adc1 ) ; let mut adc2 = Adc :: < ADC2 , Disabled > :: default_from_rb ( adc2 ) ; // Check adc_ker_ck_input check_clock ( & prec , clocks ) ; // Enable AHB clock let prec = prec . enable ( ) ; // Power Down adc1 . power_down ( ) ; adc2 . power_down ( ) ; // Reset peripheral prec . reset ( ) ; // Power Up, Preconfigure and Calibrate adc1 . power_up ( delay ) ; adc2 . power_up ( delay ) ; adc1 . preconfigure ( ) ; adc2 . preconfigure ( ) ; adc1 . calibrate ( ) ; adc2 . calibrate ( ) ; ( adc1 , adc2 ) }
Initialise ADC12 together
Sets all configurable parameters to one-shot defaults,
performs a boot-time calibration.
Initialise ADC12 together Sets all configurable parameters to one - shot defaults performs a boot - time calibration .
adc1
ADC1
adc2
ADC2
delay
&mut impl DelayUs<u8>
prec
rec::Adc12
clocks
&CoreClocks
adc1
ADC1
adc2
ADC2
delay
&mut impl DelayUs<u8>
prec
rec::Adc12
clocks
&CoreClocks