aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-04-13 21:06:27 +0200
committerGitHub <[email protected]>2022-04-13 21:06:27 +0200
commit391fdc097ec1691cfab6a3db5c3992f6f2e6da8e (patch)
tree8c2cc6745084fa3e456b5090e826502a96a2be5c
parent2217de24c02e9f7e0aafeb8315ab6be8b644c52f (diff)
parente5a843dc062bcbd27e2a0e6b34334046522a881f (diff)
Merge pull request #718 from embassy-rs/net-fixes
Net fixes
-rw-r--r--embassy-net/Cargo.toml4
-rw-r--r--embassy-net/src/stack.rs5
-rw-r--r--embassy-stm32/Cargo.toml2
-rw-r--r--examples/std/Cargo.toml2
-rw-r--r--examples/stm32f7/Cargo.toml2
-rw-r--r--examples/stm32h7/Cargo.toml2
6 files changed, 10 insertions, 7 deletions
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml
index a85eea0cb..90e84d828 100644
--- a/embassy-net/Cargo.toml
+++ b/embassy-net/Cargo.toml
@@ -14,9 +14,11 @@ flavors = [
14] 14]
15 15
16[features] 16[features]
17default = ["pool-4"] 17default = []
18std = [] 18std = []
19 19
20defmt = ["dep:defmt", "smoltcp/defmt"]
21
20tcp = ["smoltcp/socket-tcp"] 22tcp = ["smoltcp/socket-tcp"]
21dhcpv4 = ["medium-ethernet", "smoltcp/socket-dhcpv4"] 23dhcpv4 = ["medium-ethernet", "smoltcp/socket-dhcpv4"]
22medium-ethernet = ["smoltcp/medium-ethernet"] 24medium-ethernet = ["smoltcp/medium-ethernet"]
diff --git a/embassy-net/src/stack.rs b/embassy-net/src/stack.rs
index f1f92e8ed..8623a7275 100644
--- a/embassy-net/src/stack.rs
+++ b/embassy-net/src/stack.rs
@@ -230,12 +230,13 @@ pub fn is_config_up() -> bool {
230 STACK.borrow().borrow().as_ref().unwrap().config_up 230 STACK.borrow().borrow().as_ref().unwrap().config_up
231} 231}
232 232
233pub async fn run() { 233pub async fn run() -> ! {
234 futures::future::poll_fn(|cx| { 234 futures::future::poll_fn(|cx| {
235 Stack::with(|stack| stack.poll(cx)); 235 Stack::with(|stack| stack.poll(cx));
236 Poll::<()>::Pending 236 Poll::<()>::Pending
237 }) 237 })
238 .await 238 .await;
239 unreachable!()
239} 240}
240 241
241fn instant_to_smoltcp(instant: Instant) -> SmolInstant { 242fn instant_to_smoltcp(instant: Instant) -> SmolInstant {
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml
index 037d32751..91a65193f 100644
--- a/embassy-stm32/Cargo.toml
+++ b/embassy-stm32/Cargo.toml
@@ -36,7 +36,7 @@ flavors = [
36embassy = { version = "0.1.0", path = "../embassy" } 36embassy = { version = "0.1.0", path = "../embassy" }
37embassy-macros = { version = "0.1.0", path = "../embassy-macros", features = ["stm32"] } 37embassy-macros = { version = "0.1.0", path = "../embassy-macros", features = ["stm32"] }
38embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" } 38embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" }
39embassy-net = { version = "0.1.0", path = "../embassy-net", default-features = false, optional = true } 39embassy-net = { version = "0.1.0", path = "../embassy-net", optional = true }
40 40
41embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] } 41embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
42embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true} 42embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true}
diff --git a/examples/std/Cargo.toml b/examples/std/Cargo.toml
index ef60fe992..0853c323e 100644
--- a/examples/std/Cargo.toml
+++ b/examples/std/Cargo.toml
@@ -6,7 +6,7 @@ version = "0.1.0"
6 6
7[dependencies] 7[dependencies]
8embassy = { version = "0.1.0", path = "../../embassy", features = ["log", "std", "time", "nightly"] } 8embassy = { version = "0.1.0", path = "../../embassy", features = ["log", "std", "time", "nightly"] }
9embassy-net = { version = "0.1.0", path = "../../embassy-net", features=["std", "log", "medium-ethernet", "tcp", "dhcpv4"] } 9embassy-net = { version = "0.1.0", path = "../../embassy-net", features=["std", "log", "medium-ethernet", "tcp", "dhcpv4", "pool-16"] }
10 10
11async-io = "1.6.0" 11async-io = "1.6.0"
12env_logger = "0.9.0" 12env_logger = "0.9.0"
diff --git a/examples/stm32f7/Cargo.toml b/examples/stm32f7/Cargo.toml
index 3703f551f..09a06aa7f 100644
--- a/examples/stm32f7/Cargo.toml
+++ b/examples/stm32f7/Cargo.toml
@@ -8,7 +8,7 @@ resolver = "2"
8[dependencies] 8[dependencies]
9embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-timestamp-uptime"] } 9embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-timestamp-uptime"] }
10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "net", "stm32f767zi", "unstable-pac", "time-driver-any", "exti"] } 10embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "net", "stm32f767zi", "unstable-pac", "time-driver-any", "exti"] }
11embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt", "tcp", "medium-ethernet", "pool-16"] } 11embassy-net = { path = "../../embassy-net", features = ["defmt", "tcp", "medium-ethernet", "pool-16"] }
12 12
13defmt = "0.3" 13defmt = "0.3"
14defmt-rtt = "0.3" 14defmt-rtt = "0.3"
diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml
index 64baad994..f237a8173 100644
--- a/examples/stm32h7/Cargo.toml
+++ b/examples/stm32h7/Cargo.toml
@@ -10,7 +10,7 @@ resolver = "2"
10[dependencies] 10[dependencies]
11embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits"] } 11embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits"] }
12embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "net", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] } 12embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "stm32h743bi", "net", "time-driver-any", "exti", "unstable-pac", "unstable-traits"] }
13embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt", "tcp", "medium-ethernet", "pool-16"] } 13embassy-net = { path = "../../embassy-net", features = ["defmt", "tcp", "medium-ethernet", "pool-16"] }
14 14
15defmt = "0.3" 15defmt = "0.3"
16defmt-rtt = "0.3" 16defmt-rtt = "0.3"