[−][src]Struct stm32h7xx_hal::adc::Adc
Methods
impl Adc<ADC1, Disabled>
[src]
pub fn adc1(adc: ADC1, delay: &mut Delay, ccdr: &mut Ccdr) -> Self
[src]
Initialise ADC
Sets all configurable parameters to one-shot defaults, performs a boot-time calibration.
pub fn power_up(&mut self, delay: &mut Delay)
[src]
Disables Deeppowerdown-mode and enables voltage regulator
Note: After power-up, a [calibration
]: #method.calibrate shall be run
pub fn power_down(&mut self)
[src]
Enables Deeppowerdown-mode and disables voltage regulator
Note: This resets the [calibration
]: #method.calibrate of the ADC
pub fn calibrate(&mut self)
[src]
Calibrates the ADC in single channel mode
Note: The ADC must be disabled
pub fn enable(self) -> Adc<ADC1, Enabled>
[src]
Enable ADC
impl Adc<ADC1, Enabled>
[src]
impl<ED> Adc<ADC1, ED>
[src]
pub fn save_cfg(&mut self) -> StoredConfig
[src]
Save current ADC config
pub fn restore_cfg(&mut self, cfg: StoredConfig)
[src]
Restore saved ADC config
pub fn default_cfg(&mut self) -> StoredConfig
[src]
Reset the ADC config to default, return existing config
pub fn get_sample_time(&self) -> AdcSampleTime
[src]
Get ADC samping time
pub fn get_resolution(&self) -> Resolution
[src]
Get ADC sampling resolution
pub fn get_lshift(&self) -> AdcLshift
[src]
Get ADC lshift value
pub fn set_sample_time(&mut self, t_samp: AdcSampleTime)
[src]
Set ADC sampling time
Options can be found in AdcSampleTime.
pub fn set_resolution(&mut self, res: Resolution)
[src]
Set ADC sampling resolution
pub fn set_lshift(&mut self, lshift: AdcLshift)
[src]
Set ADC lshift
LSHIFT[3:0] must be in range of 0..=15
pub fn max_sample(&self) -> u32
[src]
Returns the largest possible sample value for the current settings
pub fn read_offset_calibration_value(&self) -> AdcCalOffset
[src]
Returns the offset calibration value for single ended channel
pub fn read_linear_calibration_values(&mut self) -> AdcCalLinear
[src]
Returns the linear calibration values stored in an array in the following order: LINCALRDYW1 -> result[0] ... LINCALRDYW6 -> result[5]
impl Adc<ADC2, Disabled>
[src]
pub fn adc2(adc: ADC2, delay: &mut Delay, ccdr: &mut Ccdr) -> Self
[src]
Initialise ADC
Sets all configurable parameters to one-shot defaults, performs a boot-time calibration.
pub fn power_up(&mut self, delay: &mut Delay)
[src]
Disables Deeppowerdown-mode and enables voltage regulator
Note: After power-up, a [calibration
]: #method.calibrate shall be run
pub fn power_down(&mut self)
[src]
Enables Deeppowerdown-mode and disables voltage regulator
Note: This resets the [calibration
]: #method.calibrate of the ADC
pub fn calibrate(&mut self)
[src]
Calibrates the ADC in single channel mode
Note: The ADC must be disabled
pub fn enable(self) -> Adc<ADC2, Enabled>
[src]
Enable ADC
impl Adc<ADC2, Enabled>
[src]
impl<ED> Adc<ADC2, ED>
[src]
pub fn save_cfg(&mut self) -> StoredConfig
[src]
Save current ADC config
pub fn restore_cfg(&mut self, cfg: StoredConfig)
[src]
Restore saved ADC config
pub fn default_cfg(&mut self) -> StoredConfig
[src]
Reset the ADC config to default, return existing config
pub fn get_sample_time(&self) -> AdcSampleTime
[src]
Get ADC samping time
pub fn get_resolution(&self) -> Resolution
[src]
Get ADC sampling resolution
pub fn get_lshift(&self) -> AdcLshift
[src]
Get ADC lshift value
pub fn set_sample_time(&mut self, t_samp: AdcSampleTime)
[src]
Set ADC sampling time
Options can be found in AdcSampleTime.
pub fn set_resolution(&mut self, res: Resolution)
[src]
Set ADC sampling resolution
pub fn set_lshift(&mut self, lshift: AdcLshift)
[src]
Set ADC lshift
LSHIFT[3:0] must be in range of 0..=15
pub fn max_sample(&self) -> u32
[src]
Returns the largest possible sample value for the current settings
pub fn read_offset_calibration_value(&self) -> AdcCalOffset
[src]
Returns the offset calibration value for single ended channel
pub fn read_linear_calibration_values(&mut self) -> AdcCalLinear
[src]
Returns the linear calibration values stored in an array in the following order: LINCALRDYW1 -> result[0] ... LINCALRDYW6 -> result[5]
impl Adc<ADC3, Disabled>
[src]
pub fn adc3(adc: ADC3, delay: &mut Delay, ccdr: &mut Ccdr) -> Self
[src]
Initialise ADC
Sets all configurable parameters to one-shot defaults, performs a boot-time calibration.
pub fn power_up(&mut self, delay: &mut Delay)
[src]
Disables Deeppowerdown-mode and enables voltage regulator
Note: After power-up, a [calibration
]: #method.calibrate shall be run
pub fn power_down(&mut self)
[src]
Enables Deeppowerdown-mode and disables voltage regulator
Note: This resets the [calibration
]: #method.calibrate of the ADC
pub fn calibrate(&mut self)
[src]
Calibrates the ADC in single channel mode
Note: The ADC must be disabled
pub fn enable(self) -> Adc<ADC3, Enabled>
[src]
Enable ADC
impl Adc<ADC3, Enabled>
[src]
impl<ED> Adc<ADC3, ED>
[src]
pub fn save_cfg(&mut self) -> StoredConfig
[src]
Save current ADC config
pub fn restore_cfg(&mut self, cfg: StoredConfig)
[src]
Restore saved ADC config
pub fn default_cfg(&mut self) -> StoredConfig
[src]
Reset the ADC config to default, return existing config
pub fn get_sample_time(&self) -> AdcSampleTime
[src]
Get ADC samping time
pub fn get_resolution(&self) -> Resolution
[src]
Get ADC sampling resolution
pub fn get_lshift(&self) -> AdcLshift
[src]
Get ADC lshift value
pub fn set_sample_time(&mut self, t_samp: AdcSampleTime)
[src]
Set ADC sampling time
Options can be found in AdcSampleTime.
pub fn set_resolution(&mut self, res: Resolution)
[src]
Set ADC sampling resolution
pub fn set_lshift(&mut self, lshift: AdcLshift)
[src]
Set ADC lshift
LSHIFT[3:0] must be in range of 0..=15
pub fn max_sample(&self) -> u32
[src]
Returns the largest possible sample value for the current settings
pub fn read_offset_calibration_value(&self) -> AdcCalOffset
[src]
Returns the offset calibration value for single ended channel
pub fn read_linear_calibration_values(&mut self) -> AdcCalLinear
[src]
Returns the linear calibration values stored in an array in the following order: LINCALRDYW1 -> result[0] ... LINCALRDYW6 -> result[5]
Trait Implementations
impl<WORD, PIN> OneShot<ADC1, WORD, PIN> for Adc<ADC1, Enabled> where
WORD: From<u32>,
PIN: Channel<ADC1, ID = u8>,
[src]
WORD: From<u32>,
PIN: Channel<ADC1, ID = u8>,
type Error = ()
Error type returned by ADC methods
fn read(&mut self, _pin: &mut PIN) -> Result<WORD, Self::Error>
[src]
impl<WORD, PIN> OneShot<ADC2, WORD, PIN> for Adc<ADC2, Enabled> where
WORD: From<u32>,
PIN: Channel<ADC2, ID = u8>,
[src]
WORD: From<u32>,
PIN: Channel<ADC2, ID = u8>,
type Error = ()
Error type returned by ADC methods
fn read(&mut self, _pin: &mut PIN) -> Result<WORD, Self::Error>
[src]
impl<WORD, PIN> OneShot<ADC3, WORD, PIN> for Adc<ADC3, Enabled> where
WORD: From<u32>,
PIN: Channel<ADC3, ID = u8>,
[src]
WORD: From<u32>,
PIN: Channel<ADC3, ID = u8>,
Auto Trait Implementations
impl<ADC, ED> Unpin for Adc<ADC, ED> where
ADC: Unpin,
ED: Unpin,
ADC: Unpin,
ED: Unpin,
impl<ADC, ED> Send for Adc<ADC, ED> where
ADC: Send,
ED: Send,
ADC: Send,
ED: Send,
impl<ADC, ED> Sync for Adc<ADC, ED> where
ADC: Sync,
ED: Sync,
ADC: Sync,
ED: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
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.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self