Module stm32f3xx_hal::adc::config
source · Expand description
Provides a Config
for ADC configuration and all configuration options options.
The Config
can be applied like that:
use stm32f3xx_hal::adc::{
Adc,
config::{self, Config},
}
let config = Config::default()
.align(config::Align::Left)
.resolution(config::Resolution::Eight);
let adc = Adc::new(dp.ADC1, config, /* ... */);
which will configure the peripheral accordingly.
Configuration can be changed later on:
let adc = // ...
// ...
adc::set_align(config::Align::Right);
Structs
- Configuration for the ADC.
Enums
- The conversion mode the ADC peripheral is operating in.
- Configure the data register alignment.
- DMA mode
- Possible external triggers which can trigger a start of conversion instead of doing it manually via
Adc::start_conversion
. - Overrun Mode
- The bit width / resolution to sample with the ADC.
- ADC sampling time
- The place in the sequence a given channel should be captured. See
Channel
/channel::Id
- Possible trigger modes of the
ExternalTrigger
.