Skip to content

Commit

Permalink
Merge pull request #778 from andrewdavidmackenzie/pigg_776
Browse files Browse the repository at this point in the history
More feature simplicity and all-feature fixes
  • Loading branch information
andrewdavidmackenzie authored Jan 7, 2025
2 parents be2414e + fde718f commit 11c802e
Show file tree
Hide file tree
Showing 8 changed files with 414 additions and 334 deletions.
15 changes: 7 additions & 8 deletions porky/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,16 @@ rust-version = "1.80"
[[bin]]
name = "porky_w"
path = "src/porky_w.rs"
required-features = ["pico_w"]
required-features = ["wifi"]

[[bin]]
name = "porky"
path = "src/porky.rs"
required-features = ["pico"]
required-features = ["usb"]

[features]
default = ["usb", "no_std"]
pico = ["cyw43-pio"] # I don't know why yet is needed. Reported to EMbassy
pico_w = ["wifi"]
wifi = ["cyw43", "cyw43-pio", "embassy-net", "tcp", "discovery"]
wifi = ["cyw43", "embassy-net", "tcp", "discovery"]
no_std = []
debug-probe = []
usb = ["embassy-usb"]
Expand All @@ -34,9 +32,11 @@ embassy-rp = { version = "0.2.0", default-features = false, features = ["rp2040"
embassy-sync = { version = "0.6.0", default-features = false }
embassy-futures = { version = "0.1.1", default-features = false }

# Needed even when no wifi - I don't know why yet. Reported to Embassy
cyw43-pio = { version = "0.2.0", default-features = false, features = ["defmt"] }

# Optional Embassy Dependencies
cyw43 = { version = "0.2.0", default-features = false, features = ["defmt"], optional = true }
cyw43-pio = { version = "0.2.0", default-features = false, features = ["defmt"], optional = true }
embassy-net = { version = "0.5.0", default-features = false, features = ["defmt", "tcp", "udp", "dns", "dhcpv4"], optional = true }
embassy-usb = { version = "0.3.0", default-features = false, optional = true }

Expand Down Expand Up @@ -97,5 +97,4 @@ edge-nal = { git = "https://github.com/ivmarkov/edge-net.git", branch = "embassy

[package.metadata.cargo-all-features]
skip_optional_dependencies = true
denylist = ["usb"]
always_include_features = ["no_std"]
always_include_features = ["no_std", "wifi"]
15 changes: 7 additions & 8 deletions porky/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,25 @@ clean:
cargo clean

clippy:
cargo clippy --features "pico_w"
cargo clippy --features "pico"
cargo clippy --features "wifi"

run-pico-w:
cargo run --release --bin porky_w --features "pico_w"
cargo run --release --bin porky_w --features "wifi"

run-pico:
cargo run --release --bin porky --features "pico"
cargo run --release --bin porky

build-pico-w:
cargo build --release --bin porky_w --features "pico_w"
cargo build --release --bin porky_w --features "wifi"

build-pico:
cargo build --release --bin porky --features "pico"
cargo build --release --bin porky

run-w:
cargo run --release --bin porky_w --features "pico_w"
cargo run --release --bin porky_w --features "wifi"

run:
cargo run --release --bin porky --features "pico"
cargo run --release --bin porky

install-uf2:
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
Expand Down
Loading

0 comments on commit 11c802e

Please sign in to comment.