#[repr(C)]pub struct RegisterBlock {Show 20 fields
pub sr: u32,
pub cr1: u32,
pub cr2: u32,
pub smpr1: u32,
pub smpr2: u32,
pub jofr1: u32,
pub jofr2: u32,
pub jofr3: u32,
pub jofr4: u32,
pub htr: u32,
pub ltr: u32,
pub sqr1: u32,
pub sqr2: u32,
pub sqr3: u32,
pub jsqr: u32,
pub jdr1: u32,
pub jdr2: u32,
pub jdr3: u32,
pub jdr4: u32,
pub dr: u32,
}Fields§
§sr: u32§cr1: u32§cr2: u32§smpr1: u32§smpr2: u32§jofr1: u32§jofr2: u32§jofr3: u32§jofr4: u32§htr: u32§ltr: u32§sqr1: u32§sqr2: u32§sqr3: u32§jsqr: u32§jdr1: u32§jdr2: u32§jdr3: u32§jdr4: u32§dr: u32Implementations§
Source§impl RegisterBlock
impl RegisterBlock
Sourcepub fn set_resolution(&mut self, resolution: AdcResolution)
pub fn set_resolution(&mut self, resolution: AdcResolution)
Set ADC resolution
Sourcepub fn enable_continuous(&mut self)
pub fn enable_continuous(&mut self)
Enable continuous conversion mode
Sourcepub fn disable_continuous(&mut self)
pub fn disable_continuous(&mut self)
Disable continuous conversion mode
Sourcepub fn start_conversion(&mut self)
pub fn start_conversion(&mut self)
Start software conversion
Sourcepub fn is_conversion_complete(&self) -> bool
pub fn is_conversion_complete(&self) -> bool
Check if conversion is complete
Sourcepub fn clear_eoc_flag(&mut self)
pub fn clear_eoc_flag(&mut self)
Clear end of conversion flag
Sourcepub fn set_sample_time_low(&mut self, channel: u8, sample_time: AdcSampleTime)
pub fn set_sample_time_low(&mut self, channel: u8, sample_time: AdcSampleTime)
Set sample time for channel (0-9)
Sourcepub fn set_sample_time_high(&mut self, channel: u8, sample_time: AdcSampleTime)
pub fn set_sample_time_high(&mut self, channel: u8, sample_time: AdcSampleTime)
Set sample time for channel (10-18)
Sourcepub fn set_regular_sequence_1(&mut self, channel: u8)
pub fn set_regular_sequence_1(&mut self, channel: u8)
Set first regular sequence channel
Sourcepub fn set_regular_sequence_length(&mut self, length: u8)
pub fn set_regular_sequence_length(&mut self, length: u8)
Set regular sequence length
Sourcepub fn single_conversion(&mut self, channel: u8) -> u16
pub fn single_conversion(&mut self, channel: u8) -> u16
Perform single conversion on a channel
Auto Trait Implementations§
impl Freeze for RegisterBlock
impl RefUnwindSafe for RegisterBlock
impl Send for RegisterBlock
impl Sync for RegisterBlock
impl Unpin for RegisterBlock
impl UnwindSafe for RegisterBlock
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