Split embassy crate into embassy-executor, embassy-util.

This commit is contained in:
Dario Nieuwenhuis
2022-07-29 21:58:35 +02:00
parent 8745d646f0
commit a0f1b0ee01
319 changed files with 1159 additions and 998 deletions

View File

@ -59,14 +59,14 @@
use cortex_m_rt::entry;
use defmt::*;
use embassy::time::{Duration, Instant, Timer};
use embassy::util::Forever;
use embassy_executor::time::{Duration, Instant, Timer};
use embassy_stm32::executor::{Executor, InterruptExecutor};
use embassy_stm32::interrupt;
use embassy_stm32::interrupt::InterruptExt;
use embassy_util::Forever;
use {defmt_rtt as _, panic_probe as _};
#[embassy::task]
#[embassy_executor::task]
async fn run_high() {
loop {
info!(" [high] tick!");
@ -74,7 +74,7 @@ async fn run_high() {
}
}
#[embassy::task]
#[embassy_executor::task]
async fn run_med() {
loop {
let start = Instant::now();
@ -91,7 +91,7 @@ async fn run_med() {
}
}
#[embassy::task]
#[embassy_executor::task]
async fn run_low() {
loop {
let start = Instant::now();