diff options
| author | Matous Hybl <[email protected]> | 2022-03-27 19:29:29 +0200 |
|---|---|---|
| committer | Matous Hybl <[email protected]> | 2022-04-07 12:57:02 +0200 |
| commit | eb6910fa868a1af1a9d64ba1f5565eaaf437f7b9 (patch) | |
| tree | 479d1b17b4c944836bb9fd1b1a9f0a35bfab10c5 | |
| parent | fee0aef076718adcb2c654920712aa20786c94be (diff) | |
Reexport unborrow macro in HALs
| -rw-r--r-- | embassy-nrf/src/lib.rs | 3 | ||||
| -rw-r--r-- | embassy-rp/src/lib.rs | 3 | ||||
| -rw-r--r-- | embassy-stm32/src/lib.rs | 3 | ||||
| -rw-r--r-- | examples/stm32h7/Cargo.toml | 1 | ||||
| -rw-r--r-- | 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 06e8235e3..0004eb583 100644 --- a/embassy-nrf/src/lib.rs +++ b/embassy-nrf/src/lib.rs | |||
| @@ -115,6 +115,9 @@ pub use chip::pac; | |||
| 115 | #[cfg(not(feature = "unstable-pac"))] | 115 | #[cfg(not(feature = "unstable-pac"))] |
| 116 | pub(crate) use chip::pac; | 116 | pub(crate) use chip::pac; |
| 117 | 117 | ||
| 118 | pub use embassy::util::Unborrow; | ||
| 119 | pub use embassy_hal_common::unborrow; | ||
| 120 | |||
| 118 | pub use chip::{peripherals, Peripherals}; | 121 | pub use chip::{peripherals, Peripherals}; |
| 119 | 122 | ||
| 120 | pub mod interrupt { | 123 | pub mod interrupt { |
diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs index cf5c10c1a..5de38af08 100644 --- a/embassy-rp/src/lib.rs +++ b/embassy-rp/src/lib.rs | |||
| @@ -7,6 +7,9 @@ pub use rp2040_pac2 as pac; | |||
| 7 | #[cfg(not(feature = "unstable-pac"))] | 7 | #[cfg(not(feature = "unstable-pac"))] |
| 8 | pub(crate) use rp2040_pac2 as pac; | 8 | pub(crate) use rp2040_pac2 as pac; |
| 9 | 9 | ||
| 10 | pub use embassy::util::Unborrow; | ||
| 11 | pub use embassy_hal_common::unborrow; | ||
| 12 | |||
| 10 | // This mod MUST go first, so that the others see its macros. | 13 | // This mod MUST go first, so that the others see its macros. |
| 11 | pub(crate) mod fmt; | 14 | pub(crate) mod fmt; |
| 12 | 15 | ||
diff --git a/embassy-stm32/src/lib.rs b/embassy-stm32/src/lib.rs index 45b8e1800..3417c5d9b 100644 --- a/embassy-stm32/src/lib.rs +++ b/embassy-stm32/src/lib.rs | |||
| @@ -9,6 +9,9 @@ pub use stm32_metapac as pac; | |||
| 9 | #[cfg(not(feature = "unstable-pac"))] | 9 | #[cfg(not(feature = "unstable-pac"))] |
| 10 | pub(crate) use stm32_metapac as pac; | 10 | pub(crate) use stm32_metapac as pac; |
| 11 | 11 | ||
| 12 | pub use embassy::util::Unborrow; | ||
| 13 | pub use embassy_hal_common::unborrow; | ||
| 14 | |||
| 12 | // This must go FIRST so that all the other modules see its macros. | 15 | // This must go FIRST so that all the other modules see its macros. |
| 13 | pub mod fmt; | 16 | pub mod fmt; |
| 14 | include!(concat!(env!("OUT_DIR"), "/_macros.rs")); | 17 | include!(concat!(env!("OUT_DIR"), "/_macros.rs")); |
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index 5c8861af5..6146b6dc6 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml | |||
| @@ -11,7 +11,6 @@ resolver = "2" | |||
| 11 | embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-timestamp-uptime"] } | 11 | embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-timestamp-uptime"] } |
| 12 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "net", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } | 12 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "net", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } |
| 13 | embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt", "tcp", "medium-ethernet", "pool-16"] } | 13 | embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt", "tcp", "medium-ethernet", "pool-16"] } |
| 14 | embassy-hal-common = { path = "../../embassy-hal-common", default-features = false, features = ["defmt"] } | ||
| 15 | 14 | ||
| 16 | defmt = "0.3" | 15 | defmt = "0.3" |
| 17 | defmt-rtt = "0.3" | 16 | 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 9ddfd8b27..3b1b8044d 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::*; | |||
| 10 | use embassy::executor::Spawner; | 10 | use embassy::executor::Spawner; |
| 11 | use embassy::time::{Duration, Timer}; | 11 | use embassy::time::{Duration, Timer}; |
| 12 | use embassy::util::Unborrow; | 12 | use embassy::util::Unborrow; |
| 13 | use embassy_hal_common::unborrow; | ||
| 14 | use embassy_stm32::gpio::low_level::AFType; | 13 | use embassy_stm32::gpio::low_level::AFType; |
| 15 | use embassy_stm32::gpio::Speed; | 14 | use embassy_stm32::gpio::Speed; |
| 16 | use embassy_stm32::pwm::*; | 15 | use embassy_stm32::pwm::*; |
| 17 | use embassy_stm32::time::{Hertz, U32Ext}; | 16 | use embassy_stm32::time::{Hertz, U32Ext}; |
| 17 | use embassy_stm32::unborrow; | ||
| 18 | use embassy_stm32::{Config, Peripherals}; | 18 | use embassy_stm32::{Config, Peripherals}; |
| 19 | 19 | ||
| 20 | pub fn config() -> Config { | 20 | pub fn config() -> Config { |
