pub struct AdcConfig {
pub clock_mode: ClockMode,
pub sample_time: SampleTime,
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.
sample_time: SampleTime
ADC sample time. See the SampleTime
enum for details. Higher values
result in more accurate readings.
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§
Auto Trait Implementations§
impl Freeze for AdcConfig
impl RefUnwindSafe for AdcConfig
impl Send for AdcConfig
impl Sync for AdcConfig
impl Unpin for AdcConfig
impl UnwindSafe for AdcConfig
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