Split embassy crate into embassy-executor, embassy-util.
This commit is contained in:
@ -3,8 +3,8 @@
|
||||
#![feature(type_alias_impl_trait)]
|
||||
|
||||
use defmt::info;
|
||||
use embassy::executor::Spawner;
|
||||
use embassy::time::Duration;
|
||||
use embassy_executor::executor::Spawner;
|
||||
use embassy_executor::time::Duration;
|
||||
use embassy_nrf::saadc::{ChannelConfig, Config, Saadc, SamplerState};
|
||||
use embassy_nrf::timer::Frequency;
|
||||
use embassy_nrf::{interrupt, Peripherals};
|
||||
@ -12,7 +12,7 @@ use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
// Demonstrates both continuous sampling and scanning multiple channels driven by a PPI linked timer
|
||||
|
||||
#[embassy::main]
|
||||
#[embassy_executor::main]
|
||||
async fn main(_spawner: Spawner, mut p: Peripherals) {
|
||||
let config = Config::default();
|
||||
let channel_1_config = ChannelConfig::single_ended(&mut p.P0_02);
|
||||
@ -27,7 +27,7 @@ async fn main(_spawner: Spawner, mut p: Peripherals) {
|
||||
|
||||
// This delay demonstrates that starting the timer prior to running
|
||||
// the task sampler is benign given the calibration that follows.
|
||||
embassy::time::Timer::after(Duration::from_millis(500)).await;
|
||||
embassy_executor::time::Timer::after(Duration::from_millis(500)).await;
|
||||
saadc.calibrate().await;
|
||||
|
||||
let mut bufs = [[[0; 3]; 500]; 2];
|
||||
|
Reference in New Issue
Block a user