more tidy

This commit is contained in:
Joe Ardent 2026-07-02 18:45:36 -07:00
parent b08e04eaa5
commit 8616e14d29

View file

@ -22,7 +22,7 @@ async fn main(spawner: Spawner) {
let a = Adc::new(p.ADC1, Default::default()); let a = Adc::new(p.ADC1, Default::default());
let channel = p.PA0.into(); let channel = p.PA0.into();
spawner.spawn(unwrap!(read_adc(a, channel))); spawner.spawn(unwrap!(read_adc1_pa0(a, channel)));
spawner.spawn(unwrap!(blinky(p.PA5.into()))); spawner.spawn(unwrap!(blinky(p.PA5.into())));
@ -31,7 +31,7 @@ async fn main(spawner: Spawner) {
} }
#[embassy_executor::task] #[embassy_executor::task]
async fn read_adc(mut a: Adc<'static, ADC1>, mut channel: Peri<'static, PA0>) { async fn read_adc1_pa0(mut a: Adc<'static, ADC1>, mut channel: Peri<'static, PA0>) {
loop { loop {
let val = a.blocking_read(&mut channel, SampleTime::CYCLES12_5); let val = a.blocking_read(&mut channel, SampleTime::CYCLES12_5);
defmt::info!("read {}", val); defmt::info!("read {}", val);