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