Split embassy crate into embassy-executor, embassy-util.
This commit is contained in:
parent
8745d646f0
commit
a0f1b0ee01
319 changed files with 1159 additions and 998 deletions
docs/modules/ROOT/examples
|
@ -5,7 +5,7 @@ name = "embassy-basic-example"
|
|||
version = "0.1.0"
|
||||
|
||||
[dependencies]
|
||||
embassy = { version = "0.1.0", path = "../../../../../embassy", features = ["defmt", "nightly"] }
|
||||
embassy-executor = { version = "0.1.0", path = "../../../../../embassy-executor", features = ["defmt", "nightly"] }
|
||||
embassy-nrf = { version = "0.1.0", path = "../../../../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "nightly"] }
|
||||
|
||||
defmt = "0.3"
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
#![feature(type_alias_impl_trait)]
|
||||
|
||||
use defmt::*;
|
||||
use embassy::executor::Spawner;
|
||||
use embassy::time::{Duration, Timer};
|
||||
use embassy_executor::executor::Spawner;
|
||||
use embassy_executor::time::{Duration, Timer};
|
||||
use embassy_nrf::gpio::{Level, Output, OutputDrive};
|
||||
use embassy_nrf::peripherals::P0_13;
|
||||
use embassy_nrf::Peripherals;
|
||||
use {defmt_rtt as _, panic_probe as _}; // global logger
|
||||
|
||||
#[embassy::task]
|
||||
#[embassy_executor::task]
|
||||
async fn blinker(mut led: Output<'static, P0_13>, interval: Duration) {
|
||||
loop {
|
||||
led.set_high();
|
||||
|
@ -20,7 +20,7 @@ async fn blinker(mut led: Output<'static, P0_13>, interval: Duration) {
|
|||
}
|
||||
}
|
||||
|
||||
#[embassy::main]
|
||||
#[embassy_executor::main]
|
||||
async fn main(spawner: Spawner, p: Peripherals) {
|
||||
let led = Output::new(p.P0_13, Level::Low, OutputDrive::Standard);
|
||||
unwrap!(spawner.spawn(blinker(led, Duration::from_millis(300))));
|
||||
|
|
|
@ -8,7 +8,7 @@ members = [
|
|||
]
|
||||
|
||||
[patch.crates-io]
|
||||
embassy = { path = "../../../../../embassy" }
|
||||
embassy-executor = { path = "../../../../../embassy-executor" }
|
||||
embassy-stm32 = { path = "../../../../../embassy-stm32" }
|
||||
stm32-metapac = { path = "../../../../../stm32-metapac" }
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ edition = "2021"
|
|||
cortex-m = "0.7"
|
||||
cortex-m-rt = "0.7"
|
||||
embassy-stm32 = { version = "0.1.0", features = ["stm32l475vg", "memory-x", "exti"], default-features = false }
|
||||
embassy = { version = "0.1.0", default-features = false, features = ["nightly"] }
|
||||
embassy-executor = { version = "0.1.0", default-features = false, features = ["nightly"] }
|
||||
|
||||
defmt = "0.3.0"
|
||||
defmt-rtt = "0.3.0"
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
#![no_main]
|
||||
#![feature(type_alias_impl_trait)]
|
||||
|
||||
use embassy::executor::Spawner;
|
||||
use embassy_executor::executor::Spawner;
|
||||
use embassy_stm32::exti::ExtiInput;
|
||||
use embassy_stm32::gpio::{Input, Level, Output, Pull, Speed};
|
||||
use embassy_stm32::Peripherals;
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
|
||||
#[embassy::main]
|
||||
#[embassy_executor::main]
|
||||
async fn main(_s: Spawner, p: Peripherals) {
|
||||
let mut led = Output::new(p.PB14, Level::Low, Speed::VeryHigh);
|
||||
let mut button = ExtiInput::new(Input::new(p.PC13, Pull::Up), p.EXTI13);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue