cargo: cleanup features

This commit is contained in:
Harry Ho 2021-01-28 17:56:13 +08:00
parent b6d1b3828a
commit 3d471bff0a
1 changed files with 18 additions and 10 deletions

View File

@ -13,7 +13,11 @@ license = "BSD-2-Clause"
volatile-register = "0.2" volatile-register = "0.2"
aligned = "0.3" aligned = "0.3"
embedded-hal = "0.2" embedded-hal = "0.2"
smoltcp = { version = "0.7.0", default-features = false, features = ["proto-ipv4", "proto-ipv6", "socket-icmp", "socket-udp", "socket-tcp", "log", "verbose", "ethernet"], optional = true } smoltcp = { version = "0.7.0", default-features = false, features = [ "socket-raw", "proto-ipv4", "proto-ipv6" ], optional = true }
# Dependencies for NAL
embedded-time = { version = "0.10.1", optional = true }
embedded-nal = { version = "0.1.0", optional = true }
heapless = { version = "0.5.6", optional = true }
# Optional dependencies for building examples # Optional dependencies for building examples
stm32f4xx-hal = { version = "0.8", optional = true } stm32f4xx-hal = { version = "0.8", optional = true }
cortex-m = { version = "0.5", optional = true } cortex-m = { version = "0.5", optional = true }
@ -21,20 +25,24 @@ cortex-m-rt = { version = "0.6", optional = true }
cortex-m-rtic = { version = "0.5.3", optional = true } cortex-m-rtic = { version = "0.5.3", optional = true }
panic-itm = { version = "0.4", optional = true } panic-itm = { version = "0.4", optional = true }
log = { version = "0.4", optional = true } log = { version = "0.4", optional = true }
embedded-time = { version = "0.10.1", optional = true }
embedded-nal = { version = "0.1.0", optional = true }
heapless = { version = "0.5.6", optional = true }
[features] [features]
smoltcp-phy = ["smoltcp"] smoltcp-phy = ["smoltcp"]
smoltcp-phy-all = [ nal = [
"smoltcp/socket-raw", "smoltcp/socket-udp", "smoltcp/socket-tcp", "embedded-time", "embedded-nal", "heapless",
"smoltcp/proto-ipv4", "smoltcp/proto-ipv6" "smoltcp-phy", "smoltcp/socket-tcp", "smoltcp/ethernet"
] ]
# Example-based features # Example-based features
tx_stm32f407 = ["stm32f4xx-hal/stm32f407", "cortex-m", "cortex-m-rtic", "panic-itm", "log"] smoltcp-examples = [
tcp_stm32f407 = ["stm32f4xx-hal/stm32f407", "cortex-m", "cortex-m-rt", "cortex-m-rtic", "smoltcp-phy-all", "smoltcp/log", "panic-itm", "log"] "smoltcp-phy", "smoltcp/socket-tcp", "smoltcp/ethernet"
nal = [ "embedded-time", "embedded-nal", "smoltcp-phy", "heapless" ] ]
tx_stm32f407 = [
"stm32f4xx-hal/stm32f407", "cortex-m", "cortex-m-rtic",
"panic-itm", "log"
]
tcp_stm32f407 = [
"stm32f4xx-hal/stm32f407", "cortex-m", "cortex-m-rt", "cortex-m-rtic",
"smoltcp-examples", "panic-itm", "log"]
default = [] default = []
[[example]] [[example]]