From 3d471bff0ae16bc38a9c25786de147aeacc00d65 Mon Sep 17 00:00:00 2001 From: Harry Ho Date: Thu, 28 Jan 2021 17:56:13 +0800 Subject: [PATCH 1/2] cargo: cleanup features --- Cargo.toml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ee97bc8..30fe7f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,11 @@ license = "BSD-2-Clause" volatile-register = "0.2" aligned = "0.3" 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 stm32f4xx-hal = { version = "0.8", 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 } panic-itm = { 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] smoltcp-phy = ["smoltcp"] -smoltcp-phy-all = [ - "smoltcp/socket-raw", "smoltcp/socket-udp", "smoltcp/socket-tcp", - "smoltcp/proto-ipv4", "smoltcp/proto-ipv6" +nal = [ + "embedded-time", "embedded-nal", "heapless", + "smoltcp-phy", "smoltcp/socket-tcp", "smoltcp/ethernet" ] # Example-based features -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-phy-all", "smoltcp/log", "panic-itm", "log"] -nal = [ "embedded-time", "embedded-nal", "smoltcp-phy", "heapless" ] +smoltcp-examples = [ + "smoltcp-phy", "smoltcp/socket-tcp", "smoltcp/ethernet" +] +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 = [] [[example]] -- 2.42.0 From 6506562c3adb59a6c6f4732a2ca3eb5dcc6dc4c6 Mon Sep 17 00:00:00 2001 From: Harry Ho Date: Tue, 26 Jan 2021 17:40:34 +0800 Subject: [PATCH 2/2] cargo: fix [package] meta --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 30fe7f8..0b87be7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] categories = ["embedded", "no-std"] name = "enc424j600" -description = "Embbeded Rust Ethernet driver for ENC424J600 Ethernet controller with SPI interface, compatible with STM32F4xx" -authors = ["Harry Ho "] +description = "Embbeded Rust Ethernet driver for ENC424J600 Ethernet controller with SPI interface" +authors = ["Harry Ho ", "Dip Cheung "] version = "0.2.0" keywords = ["ethernet", "eth", "enc424j600", "stm32", "stm32f4xx"] repository = "https://git.m-labs.hk/M-Labs/ENC424J600" -- 2.42.0