tidy
This commit is contained in:
parent
1892056ea8
commit
b08e04eaa5
1 changed files with 2 additions and 7 deletions
|
|
@ -6,8 +6,7 @@ use embassy_executor::Spawner;
|
|||
use embassy_stm32::{
|
||||
adc::{Adc, SampleTime},
|
||||
gpio::{AnyPin, Level, Output, Speed},
|
||||
peripherals::{ADC1, PA0, TIM8},
|
||||
rcc::mux::ClockMux,
|
||||
peripherals::{ADC1, PA0},
|
||||
Config, Peri,
|
||||
};
|
||||
use embassy_time::Timer;
|
||||
|
|
@ -16,19 +15,15 @@ use {defmt_rtt as _, panic_probe as _};
|
|||
#[embassy_executor::main]
|
||||
async fn main(spawner: Spawner) {
|
||||
let mut config = Config::default();
|
||||
// let mux = &config.rcc.mux.adc12sel;
|
||||
// defmt::info!("adc clock: {}", mux);
|
||||
//config.rcc.mux = ClockMux::from(TIM8::steal());
|
||||
|
||||
config.rcc.mux.adc12sel = embassy_stm32::rcc::mux::Adcsel::SYS;
|
||||
|
||||
let p = embassy_stm32::init(config);
|
||||
|
||||
let a = Adc::new(p.ADC1, Default::default());
|
||||
|
||||
let channel = p.PA0.into();
|
||||
spawner.spawn(unwrap!(read_adc(a, channel)));
|
||||
|
||||
// Led should blink uninterrupted during erase operation
|
||||
spawner.spawn(unwrap!(blinky(p.PA5.into())));
|
||||
|
||||
Timer::after_secs(20).await;
|
||||
|
|
|
|||
Loading…
Reference in a new issue