more tidy
This commit is contained in:
parent
b08e04eaa5
commit
8616e14d29
1 changed files with 2 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ async fn main(spawner: Spawner) {
|
|||
|
||||
let a = Adc::new(p.ADC1, Default::default());
|
||||
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())));
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ async fn main(spawner: Spawner) {
|
|||
}
|
||||
|
||||
#[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 {
|
||||
let val = a.blocking_read(&mut channel, SampleTime::CYCLES12_5);
|
||||
defmt::info!("read {}", val);
|
||||
|
|
|
|||
Loading…
Reference in a new issue