summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2022-07-29 21:58:35 +0200
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2022-07-29 23:40:36 +0200
commita0f1b0ee01d461607660d2d56b5b1bdc57e0d3fb (patch)
treee60fc8f8db8ec07e55d655c1a830b07f4db0b7d2 /docs
parent8745d646f0976791b7098456aa61adb983fb1c18 (diff)
downloadembassy-a0f1b0ee01d461607660d2d56b5b1bdc57e0d3fb.zip
Split embassy crate into embassy-executor, embassy-util.
Diffstat (limited to 'docs')
-rw-r--r--docs/modules/ROOT/examples/basic/Cargo.toml2
-rw-r--r--docs/modules/ROOT/examples/basic/src/main.rs8
-rw-r--r--docs/modules/ROOT/examples/layer-by-layer/Cargo.toml2
-rw-r--r--docs/modules/ROOT/examples/layer-by-layer/blinky-async/Cargo.toml2
-rw-r--r--docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs4
5 files changed, 9 insertions, 9 deletions
diff --git a/docs/modules/ROOT/examples/basic/Cargo.toml b/docs/modules/ROOT/examples/basic/Cargo.toml
index ed1c3cb1..59e1a437 100644
--- a/docs/modules/ROOT/examples/basic/Cargo.toml
+++ b/docs/modules/ROOT/examples/basic/Cargo.toml
@@ -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"
diff --git a/docs/modules/ROOT/examples/basic/src/main.rs b/docs/modules/ROOT/examples/basic/src/main.rs
index 461741fd..cec39fd9 100644
--- a/docs/modules/ROOT/examples/basic/src/main.rs
+++ b/docs/modules/ROOT/examples/basic/src/main.rs
@@ -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))));
diff --git a/docs/modules/ROOT/examples/layer-by-layer/Cargo.toml b/docs/modules/ROOT/examples/layer-by-layer/Cargo.toml
index 2dca3cc8..9048d930 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/Cargo.toml
+++ b/docs/modules/ROOT/examples/layer-by-layer/Cargo.toml
@@ -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" }
diff --git a/docs/modules/ROOT/examples/layer-by-layer/blinky-async/Cargo.toml b/docs/modules/ROOT/examples/layer-by-layer/blinky-async/Cargo.toml
index e0c63251..e2933076 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/blinky-async/Cargo.toml
+++ b/docs/modules/ROOT/examples/layer-by-layer/blinky-async/Cargo.toml
@@ -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"
diff --git a/docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs b/docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs
index 56bc698d..b944a799 100644
--- a/docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs
+++ b/docs/modules/ROOT/examples/layer-by-layer/blinky-async/src/main.rs
@@ -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);