Merge pull request #718 from embassy-rs/net-fixes

Net fixes
This commit is contained in:
Dario Nieuwenhuis 2022-04-13 21:06:27 +02:00 committed by GitHub
commit 391fdc097e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 7 deletions

View File

@ -14,9 +14,11 @@ flavors = [
]
[features]
default = ["pool-4"]
default = []
std = []
defmt = ["dep:defmt", "smoltcp/defmt"]
tcp = ["smoltcp/socket-tcp"]
dhcpv4 = ["medium-ethernet", "smoltcp/socket-dhcpv4"]
medium-ethernet = ["smoltcp/medium-ethernet"]

View File

@ -230,12 +230,13 @@ pub fn is_config_up() -> bool {
STACK.borrow().borrow().as_ref().unwrap().config_up
}
pub async fn run() {
pub async fn run() -> ! {
futures::future::poll_fn(|cx| {
Stack::with(|stack| stack.poll(cx));
Poll::<()>::Pending
})
.await
.await;
unreachable!()
}
fn instant_to_smoltcp(instant: Instant) -> SmolInstant {

View File

@ -36,7 +36,7 @@ flavors = [
embassy = { version = "0.1.0", path = "../embassy" }
embassy-macros = { version = "0.1.0", path = "../embassy-macros", features = ["stm32"] }
embassy-hal-common = {version = "0.1.0", path = "../embassy-hal-common" }
embassy-net = { version = "0.1.0", path = "../embassy-net", default-features = false, optional = true }
embassy-net = { version = "0.1.0", path = "../embassy-net", optional = true }
embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.7", git = "https://github.com/embassy-rs/embedded-hal", branch = "embassy2", optional = true}

View File

@ -6,7 +6,7 @@ version = "0.1.0"
[dependencies]
embassy = { version = "0.1.0", path = "../../embassy", features = ["log", "std", "time", "nightly"] }
embassy-net = { version = "0.1.0", path = "../../embassy-net", features=["std", "log", "medium-ethernet", "tcp", "dhcpv4"] }
embassy-net = { version = "0.1.0", path = "../../embassy-net", features=["std", "log", "medium-ethernet", "tcp", "dhcpv4", "pool-16"] }
async-io = "1.6.0"
env_logger = "0.9.0"

View File

@ -8,7 +8,7 @@ resolver = "2"
[dependencies]
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-timestamp-uptime"] }
embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "net", "stm32f767zi", "unstable-pac", "time-driver-any", "exti"] }
embassy-net = { path = "../../embassy-net", default-features = false, features = ["defmt", "tcp", "medium-ethernet", "pool-16"] }
embassy-net = { path = "../../embassy-net", features = ["defmt", "tcp", "medium-ethernet", "pool-16"] }
defmt = "0.3"
defmt-rtt = "0.3"

View File

@ -10,7 +10,7 @@ resolver = "2"
[dependencies]
embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-timestamp-uptime", "unstable-traits"] }
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-net = { path = "../../embassy-net", features = ["defmt", "tcp", "medium-ethernet", "pool-16"] }
defmt = "0.3"
defmt-rtt = "0.3"