From 9218aff498aa4f9fca5d0aa3134fda6462801a2e Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Tue, 23 Aug 2022 01:06:14 +0200 Subject: [PATCH] Update Embassy. --- Cargo.toml | 3 ++- examples/rpi-pico-w/Cargo.toml | 20 ++++++-------------- src/lib.rs | 6 +++--- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c6120dac..cb6aa0b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,8 @@ log = ["dep:log"] [dependencies] embassy-time = { version = "0.1.0" } -embassy-util = { version = "0.1.0" } +embassy-sync = { version = "0.1.0" } +embassy-futures = { version = "0.1.0" } embassy-net = { version = "0.1.0" } atomic-polyfill = "0.1.5" diff --git a/examples/rpi-pico-w/Cargo.toml b/examples/rpi-pico-w/Cargo.toml index 98a3d105..53e72498 100644 --- a/examples/rpi-pico-w/Cargo.toml +++ b/examples/rpi-pico-w/Cargo.toml @@ -8,7 +8,6 @@ edition = "2021" cyw43 = { path = "../../", features = ["defmt"]} embassy-executor = { version = "0.1.0", features = ["defmt", "integrated-timers"] } embassy-time = { version = "0.1.0", features = ["defmt", "defmt-timestamp-uptime"] } -embassy-util = { version = "0.1.0" } embassy-rp = { version = "0.1.0", features = ["defmt", "unstable-traits", "nightly", "unstable-pac"] } embassy-net = { version = "0.1.0", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "pool-16"] } atomic-polyfill = "0.1.5" @@ -29,19 +28,12 @@ heapless = "0.7.15" [patch.crates-io] -embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" } -embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" } -embassy-util = { git = "https://github.com/embassy-rs/embassy", rev = "53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" } -embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" } -embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "53fbd0efb3e77e1e3de948afde2b5bf1a5a9735f" } -#embassy-executor = { path = "/home/dirbaio/embassy/embassy/embassy-executor" } -#embassy-util = { path = "/home/dirbaio/embassy/embassy/embassy-util" } -#embassy-rp = { path = "/home/dirbaio/embassy/embassy/embassy-rp" } -#embassy-net = { path = "/home/dirbaio/embassy/embassy/embassy-net" } -#smoltcp = { path = "./smoltcp" } - -#[patch."https://github.com/smoltcp-rs/smoltcp"] -#smoltcp = { path = "./smoltcp" } +embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "cb9f0ef5b800ce4a22cde1805e0eb88425f1e07b" } +embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "cb9f0ef5b800ce4a22cde1805e0eb88425f1e07b" } +embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "cb9f0ef5b800ce4a22cde1805e0eb88425f1e07b" } +embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "cb9f0ef5b800ce4a22cde1805e0eb88425f1e07b" } +embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "cb9f0ef5b800ce4a22cde1805e0eb88425f1e07b" } +embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "cb9f0ef5b800ce4a22cde1805e0eb88425f1e07b" } [profile.dev] debug = 2 diff --git a/src/lib.rs b/src/lib.rs index af2821e5..1c49771b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,11 +17,11 @@ use core::sync::atomic::Ordering; use core::task::Waker; use atomic_polyfill::AtomicBool; +use embassy_futures::yield_now; use embassy_net::{PacketBoxExt, PacketBuf}; +use embassy_sync::blocking_mutex::raw::NoopRawMutex; +use embassy_sync::channel::Channel; use embassy_time::{block_for, Duration, Timer}; -use embassy_util::blocking_mutex::raw::NoopRawMutex; -use embassy_util::channel::mpmc::Channel; -use embassy_util::yield_now; use embedded_hal_1::digital::blocking::OutputPin; use embedded_hal_async::spi::{SpiBusRead, SpiBusWrite, SpiDevice};