traits: migrate Delay to embedded-hal 1.0+async, remove Rng and Flash.
This commit is contained in:
@ -7,7 +7,6 @@ resolver = "2"
|
||||
|
||||
[dependencies]
|
||||
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt"] }
|
||||
embassy-traits = { version = "0.1.0", path = "../../embassy-traits", features = ["defmt"] }
|
||||
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["defmt", "stm32f103c8", "unstable-pac", "memory-x", "time-driver-any"] }
|
||||
|
||||
defmt = "0.3"
|
||||
|
@ -6,10 +6,9 @@
|
||||
mod example_common;
|
||||
|
||||
use embassy::executor::Spawner;
|
||||
use embassy::time::Delay;
|
||||
use embassy::time::{Delay, Duration, Timer};
|
||||
use embassy_stm32::adc::Adc;
|
||||
use embassy_stm32::Peripherals;
|
||||
use embassy_traits::delay::Delay as _;
|
||||
use example_common::*;
|
||||
|
||||
#[embassy::main]
|
||||
@ -24,6 +23,6 @@ async fn main(_spawner: Spawner, p: Peripherals) {
|
||||
loop {
|
||||
let v = adc.read(&mut pin);
|
||||
info!("--> {} - {} mV", v, adc.to_millivolts(v));
|
||||
Delay.delay_ms(100).await;
|
||||
Timer::after(Duration::from_millis(100)).await;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user