From eb6910fa868a1af1a9d64ba1f5565eaaf437f7b9 Mon Sep 17 00:00:00 2001 From: Matous Hybl Date: Sun, 27 Mar 2022 19:29:29 +0200 Subject: [PATCH] Reexport unborrow macro in HALs --- embassy-nrf/src/lib.rs | 3 +++ embassy-rp/src/lib.rs | 3 +++ embassy-stm32/src/lib.rs | 3 +++ examples/stm32h7/Cargo.toml | 1 - examples/stm32h7/src/bin/low_level_timer_api.rs | 2 +- 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/embassy-nrf/src/lib.rs b/embassy-nrf/src/lib.rs index 06e8235e..0004eb58 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs @@ -115,6 +115,9 @@ pub use chip::pac; #[cfg(not(feature = "unstable-pac"))] pub(crate) use chip::pac; +pub use embassy::util::Unborrow; +pub use embassy_hal_common::unborrow; + pub use chip::{peripherals, Peripherals}; pub mod interrupt { diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs index cf5c10c1..5de38af0 100644 --- a/embassy-rp/src/lib.rs +++ b/embassy-rp/src/lib.rs @@ -7,6 +7,9 @@ pub use rp2040_pac2 as pac; #[cfg(not(feature = "unstable-pac"))] pub(crate) use rp2040_pac2 as pac; +pub use embassy::util::Unborrow; +pub use embassy_hal_common::unborrow; + // This mod MUST go first, so that the others see its macros. pub(crate) mod fmt; diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index 45b8e180..3417c5d9 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs @@ -9,6 +9,9 @@ pub use stm32_metapac as pac; #[cfg(not(feature = "unstable-pac"))] pub(crate) use stm32_metapac as pac; +pub use embassy::util::Unborrow; +pub use embassy_hal_common::unborrow; + // This must go FIRST so that all the other modules see its macros. pub mod fmt; include!(concat!(env!("OUT_DIR"), "/_macros.rs")); diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index 5c8861af..6146b6dc 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml @@ -11,7 +11,6 @@ resolver = "2" embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-timestamp-uptime"] } embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "net", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt", "tcp", "medium-ethernet", "pool-16"] } -embassy-hal-common = { path = "../../embassy-hal-common", default-features = false, features = ["defmt"] } defmt = "0.3" defmt-rtt = "0.3" diff --git a/examples/stm32h7/src/bin/low_level_timer_api.rs b/examples/stm32h7/src/bin/low_level_timer_api.rs index 9ddfd8b2..3b1b8044 100644 --- a/examples/stm32h7/src/bin/low_level_timer_api.rs +++ b/examples/stm32h7/src/bin/low_level_timer_api.rs @@ -10,11 +10,11 @@ use defmt::*; use embassy::executor::Spawner; use embassy::time::{Duration, Timer}; use embassy::util::Unborrow; -use embassy_hal_common::unborrow; use embassy_stm32::gpio::low_level::AFType; use embassy_stm32::gpio::Speed; use embassy_stm32::pwm::*; use embassy_stm32::time::{Hertz, U32Ext}; +use embassy_stm32::unborrow; use embassy_stm32::{Config, Peripherals}; pub fn config() -> Config {