From e5a843dc062bcbd27e2a0e6b34334046522a881f Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Tue, 12 Apr 2022 20:14:26 +0200 Subject: [PATCH] net: auto-enable defmt in smoltcp using namespaced features. --- embassy-net/Cargo.toml | 4 +++- embassy-stm32/Cargo.toml | 2 +- examples/std/Cargo.toml | 2 +- examples/stm32f7/Cargo.toml | 2 +- examples/stm32h7/Cargo.toml | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml index a85eea0c..90e84d82 100644 --- a/embassy-net/Cargo.toml +++ b/embassy-net/Cargo.toml @@ -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"] diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 037d3275..91a65193 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml @@ -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} diff --git a/examples/std/Cargo.toml b/examples/std/Cargo.toml index ef60fe99..0853c323 100644 --- a/examples/std/Cargo.toml +++ b/examples/std/Cargo.toml @@ -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" diff --git a/examples/stm32f7/Cargo.toml b/examples/stm32f7/Cargo.toml index 3703f551..09a06aa7 100644 --- a/examples/stm32f7/Cargo.toml +++ b/examples/stm32f7/Cargo.toml @@ -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" diff --git a/examples/stm32h7/Cargo.toml b/examples/stm32h7/Cargo.toml index 64baad99..f237a817 100644 --- a/examples/stm32h7/Cargo.toml +++ b/examples/stm32h7/Cargo.toml @@ -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"