From a0f1b0ee01d461607660d2d56b5b1bdc57e0d3fb Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Fri, 29 Jul 2022 21:58:35 +0200 Subject: Split embassy crate into embassy-executor, embassy-util. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index a7a7ccd54..423740674 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Rust's async/await allows - embassy-nrf, for the Nordic Semiconductor nRF52, nRF53, nRF91 series. - **Time that Just Works** - -No more messing with hardware timers. embassy::time provides Instant, Duration and Timer types that are globally available and never overflow. +No more messing with hardware timers. embassy_executor::time provides Instant, Duration and Timer types that are globally available and never overflow. - **Real-time ready** - Tasks on the same async executor run cooperatively, but you can create multiple executors with different priorities, so that higher priority tasks preempt lower priority ones. See the example. @@ -44,13 +44,13 @@ The nrf-softdevice cr ```rust,ignore use defmt::info; -use embassy::executor::Spawner; -use embassy::time::{Duration, Timer}; +use embassy_executor::executor::Spawner; +use embassy_executor::time::{Duration, Timer}; use embassy_nrf::gpio::{AnyPin, Input, Level, Output, OutputDrive, Pin, Pull}; use embassy_nrf::Peripherals; // Declare async tasks -#[embassy::task] +#[embassy_executor::task] async fn blink(pin: AnyPin) { let mut led = Output::new(pin, Level::Low, OutputDrive::Standard); @@ -64,7 +64,7 @@ async fn blink(pin: AnyPin) { } // Main is itself an async task as well. -#[embassy::main] +#[embassy_executor::main] async fn main(spawner: Spawner, p: Peripherals) { // Spawned tasks run in the background, concurrently. spawner.spawn(blink(p.P0_13.degrade())).unwrap(); @@ -132,7 +132,7 @@ Embassy is guaranteed to compile on the latest stable Rust version at the time o Several features require nightly: -- The `#[embassy::main]` and `#[embassy::task]` attribute macros. +- The `#[embassy_executor::main]` and `#[embassy_executor::task]` attribute macros. - Async traits These are enabled by activating the `nightly` Cargo feature. If you do so, Embassy is guaranteed to compile on the exact nightly version specified in `rust-toolchain.toml`. It might compile with older or newer nightly versions, but that may change in any new patch release. -- cgit