pub struct AdcConfig {
    pub clock_mode: ClockMode,
    pub prescaler: Prescaler,
    pub operation_mode: OperationMode,
    pub cal_single_ended: Option<u16>,
    pub cal_differential: Option<u16>,
}
Expand description

Initial configuration data for the ADC peripheral.

Fields

clock_mode: ClockMode

ADC clock mode. Defaults to AHB clock rcc_hclk3 (or hclk) divided by 2.

prescaler: Prescaler

ADC clock prescaler. Defaults to no division.

operation_mode: OperationMode

One-shot, or continuous measurements. Defaults to one-shot.

cal_single_ended: Option<u16>

Optional calibration data for single-ended measurements.

cal_differential: Option<u16>

Optional calibration data for differential measurements.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.