aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-09-27 11:17:14 +0000
committerGitHub <[email protected]>2022-09-27 11:17:14 +0000
commit5c882cf4faffe68dd376b90b6ce7504fd5d259c5 (patch)
treefeb735d788e03f2e3561845a594e7ec3dd42fe1b
parent82d436075633e179f96d49b6afb9045451a591d4 (diff)
parent17d8d11f734fb0d48d5f19fd17f91c9f9fa62e57 (diff)
Merge #979
979: usb: make HALs depend only on embassy-usb-driver. r=Dirbaio a=Dirbaio Follow up to #972 bors r+ Co-authored-by: Dario Nieuwenhuis <[email protected]>
-rw-r--r--embassy-nrf/Cargo.toml6
-rw-r--r--embassy-nrf/src/usb.rs6
-rw-r--r--embassy-rp/Cargo.toml6
-rw-r--r--embassy-rp/src/usb.rs5
-rw-r--r--embassy-stm32/Cargo.toml6
-rw-r--r--embassy-stm32/src/usb/usb.rs5
6 files changed, 17 insertions, 17 deletions
diff --git a/embassy-nrf/Cargo.toml b/embassy-nrf/Cargo.toml
index 6fbbc8d9b..d80281fa3 100644
--- a/embassy-nrf/Cargo.toml
+++ b/embassy-nrf/Cargo.toml
@@ -18,10 +18,10 @@ flavors = [
18 18
19time = ["dep:embassy-time"] 19time = ["dep:embassy-time"]
20 20
21defmt = ["dep:defmt", "embassy-executor/defmt", "embassy-sync/defmt", "embassy-usb?/defmt", "embedded-io?/defmt", "embassy-embedded-hal/defmt"] 21defmt = ["dep:defmt", "embassy-executor/defmt", "embassy-sync/defmt", "embassy-usb-driver?/defmt", "embedded-io?/defmt", "embassy-embedded-hal/defmt"]
22 22
23# Enable nightly-only features 23# Enable nightly-only features
24nightly = ["embedded-hal-1", "embedded-hal-async", "embassy-usb", "embedded-storage-async", "dep:embedded-io", "embassy-embedded-hal/nightly"] 24nightly = ["embedded-hal-1", "embedded-hal-async", "dep:embassy-usb-driver", "embedded-storage-async", "dep:embedded-io", "embassy-embedded-hal/nightly"]
25 25
26# Reexport the PAC for the currently enabled chip at `embassy_nrf::pac`. 26# Reexport the PAC for the currently enabled chip at `embassy_nrf::pac`.
27# This is unstable because semver-minor (non-breaking) releases of embassy-nrf may major-bump (breaking) the PAC version. 27# This is unstable because semver-minor (non-breaking) releases of embassy-nrf may major-bump (breaking) the PAC version.
@@ -70,7 +70,7 @@ embassy-sync = { version = "0.1.0", path = "../embassy-sync" }
70embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-3"]} 70embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-3"]}
71embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } 71embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" }
72embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } 72embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" }
73embassy-usb = {version = "0.1.0", path = "../embassy-usb", optional=true } 73embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional=true }
74 74
75embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } 75embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
76embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true} 76embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true}
diff --git a/embassy-nrf/src/usb.rs b/embassy-nrf/src/usb.rs
index 20510eb49..00da5c9dd 100644
--- a/embassy-nrf/src/usb.rs
+++ b/embassy-nrf/src/usb.rs
@@ -9,10 +9,8 @@ use core::task::Poll;
9use cortex_m::peripheral::NVIC; 9use cortex_m::peripheral::NVIC;
10use embassy_hal_common::{into_ref, PeripheralRef}; 10use embassy_hal_common::{into_ref, PeripheralRef};
11use embassy_sync::waitqueue::AtomicWaker; 11use embassy_sync::waitqueue::AtomicWaker;
12pub use embassy_usb; 12use embassy_usb_driver as driver;
13use embassy_usb::driver::{ 13use embassy_usb_driver::{Direction, EndpointAddress, EndpointError, EndpointInfo, EndpointType, Event, Unsupported};
14 self, Direction, EndpointAddress, EndpointError, EndpointInfo, EndpointType, Event, Unsupported,
15};
16use pac::usbd::RegisterBlock; 14use pac::usbd::RegisterBlock;
17 15
18use crate::interrupt::{Interrupt, InterruptExt}; 16use crate::interrupt::{Interrupt, InterruptExt};
diff --git a/embassy-rp/Cargo.toml b/embassy-rp/Cargo.toml
index d0cf8025c..337a84f4a 100644
--- a/embassy-rp/Cargo.toml
+++ b/embassy-rp/Cargo.toml
@@ -12,7 +12,7 @@ flavors = [
12] 12]
13 13
14[features] 14[features]
15defmt = ["dep:defmt", "embassy-usb?/defmt"] 15defmt = ["dep:defmt", "embassy-usb-driver?/defmt"]
16 16
17# Reexport the PAC for the currently enabled chip at `embassy_rp::pac`. 17# Reexport the PAC for the currently enabled chip at `embassy_rp::pac`.
18# This is unstable because semver-minor (non-breaking) releases of embassy-rp may major-bump (breaking) the PAC version. 18# This is unstable because semver-minor (non-breaking) releases of embassy-rp may major-bump (breaking) the PAC version.
@@ -27,7 +27,7 @@ intrinsics = []
27rom-v2-intrinsics = [] 27rom-v2-intrinsics = []
28 28
29# Enable nightly-only features 29# Enable nightly-only features
30nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "embassy-embedded-hal/nightly", "dep:embassy-usb", "dep:embedded-io"] 30nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "embassy-embedded-hal/nightly", "dep:embassy-usb-driver", "dep:embedded-io"]
31 31
32# Implement embedded-hal 1.0 alpha traits. 32# Implement embedded-hal 1.0 alpha traits.
33# Implement embedded-hal-async traits if `nightly` is set as well. 33# Implement embedded-hal-async traits if `nightly` is set as well.
@@ -41,7 +41,7 @@ embassy-futures = { version = "0.1.0", path = "../embassy-futures" }
41embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-2"]} 41embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features = ["prio-bits-2"]}
42embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } 42embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" }
43embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } 43embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" }
44embassy-usb = {version = "0.1.0", path = "../embassy-usb", optional = true } 44embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional = true }
45atomic-polyfill = "1.0.1" 45atomic-polyfill = "1.0.1"
46defmt = { version = "0.3", optional = true } 46defmt = { version = "0.3", optional = true }
47log = { version = "0.4.14", optional = true } 47log = { version = "0.4.14", optional = true }
diff --git a/embassy-rp/src/usb.rs b/embassy-rp/src/usb.rs
index ce473b21d..0a904aab3 100644
--- a/embassy-rp/src/usb.rs
+++ b/embassy-rp/src/usb.rs
@@ -7,8 +7,9 @@ use core::task::Poll;
7use atomic_polyfill::compiler_fence; 7use atomic_polyfill::compiler_fence;
8use embassy_hal_common::into_ref; 8use embassy_hal_common::into_ref;
9use embassy_sync::waitqueue::AtomicWaker; 9use embassy_sync::waitqueue::AtomicWaker;
10use embassy_usb::driver::{ 10use embassy_usb_driver as driver;
11 self, Direction, EndpointAddress, EndpointAllocError, EndpointError, EndpointInfo, EndpointType, Event, Unsupported, 11use embassy_usb_driver::{
12 Direction, EndpointAddress, EndpointAllocError, EndpointError, EndpointInfo, EndpointType, Event, Unsupported,
12}; 13};
13 14
14use crate::interrupt::{Interrupt, InterruptExt}; 15use crate::interrupt::{Interrupt, InterruptExt};
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml
index 484496f24..a4a232f51 100644
--- a/embassy-stm32/Cargo.toml
+++ b/embassy-stm32/Cargo.toml
@@ -39,7 +39,7 @@ embassy-cortex-m = { version = "0.1.0", path = "../embassy-cortex-m", features =
39embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } 39embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" }
40embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" } 40embassy-embedded-hal = {version = "0.1.0", path = "../embassy-embedded-hal" }
41embassy-net = { version = "0.1.0", path = "../embassy-net", optional = true } 41embassy-net = { version = "0.1.0", path = "../embassy-net", optional = true }
42embassy-usb = {version = "0.1.0", path = "../embassy-usb", optional = true } 42embassy-usb-driver = {version = "0.1.0", path = "../embassy-usb-driver", optional = true }
43 43
44embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } 44embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
45embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true} 45embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.8", optional = true}
@@ -73,7 +73,7 @@ quote = "1.0.15"
73stm32-metapac = { version = "0.1.0", path = "../stm32-metapac", default-features = false, features = ["metadata"]} 73stm32-metapac = { version = "0.1.0", path = "../stm32-metapac", default-features = false, features = ["metadata"]}
74 74
75[features] 75[features]
76defmt = ["dep:defmt", "bxcan/unstable-defmt", "embassy-sync/defmt", "embassy-executor/defmt", "embassy-embedded-hal/defmt", "embedded-io?/defmt", "embassy-usb?/defmt"] 76defmt = ["dep:defmt", "bxcan/unstable-defmt", "embassy-sync/defmt", "embassy-executor/defmt", "embassy-embedded-hal/defmt", "embedded-io?/defmt", "embassy-usb-driver?/defmt"]
77sdmmc-rs = ["embedded-sdmmc"] 77sdmmc-rs = ["embedded-sdmmc"]
78net = ["embassy-net" ] 78net = ["embassy-net" ]
79memory-x = ["stm32-metapac/memory-x"] 79memory-x = ["stm32-metapac/memory-x"]
@@ -92,7 +92,7 @@ time-driver-tim12 = ["_time-driver"]
92time-driver-tim15 = ["_time-driver"] 92time-driver-tim15 = ["_time-driver"]
93 93
94# Enable nightly-only features 94# Enable nightly-only features
95nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io", "dep:embassy-usb", "embassy-embedded-hal/nightly"] 95nightly = ["embassy-executor/nightly", "embedded-hal-1", "embedded-hal-async", "embedded-storage-async", "dep:embedded-io", "dep:embassy-usb-driver", "embassy-embedded-hal/nightly"]
96 96
97# Reexport stm32-metapac at `embassy_stm32::pac`. 97# Reexport stm32-metapac at `embassy_stm32::pac`.
98# This is unstable because semver-minor (non-breaking) releases of embassy-stm32 may major-bump (breaking) the stm32-metapac version. 98# This is unstable because semver-minor (non-breaking) releases of embassy-stm32 may major-bump (breaking) the stm32-metapac version.
diff --git a/embassy-stm32/src/usb/usb.rs b/embassy-stm32/src/usb/usb.rs
index 39809a3e1..2654f156a 100644
--- a/embassy-stm32/src/usb/usb.rs
+++ b/embassy-stm32/src/usb/usb.rs
@@ -9,8 +9,9 @@ use atomic_polyfill::{AtomicBool, AtomicU8};
9use embassy_hal_common::into_ref; 9use embassy_hal_common::into_ref;
10use embassy_sync::waitqueue::AtomicWaker; 10use embassy_sync::waitqueue::AtomicWaker;
11use embassy_time::{block_for, Duration}; 11use embassy_time::{block_for, Duration};
12use embassy_usb::driver::{ 12use embassy_usb_driver as driver;
13 self, Direction, EndpointAddress, EndpointAllocError, EndpointError, EndpointInfo, EndpointType, Event, Unsupported, 13use embassy_usb_driver::{
14 Direction, EndpointAddress, EndpointAllocError, EndpointError, EndpointInfo, EndpointType, Event, Unsupported,
14}; 15};
15use pac::common::{Reg, RW}; 16use pac::common::{Reg, RW};
16use pac::usb::vals::{EpType, Stat}; 17use pac::usb::vals::{EpType, Stat};