Skip to content

Commit

Permalink
Remove local tuntap copy
Browse files Browse the repository at this point in the history
Bump embassy version, embassy-net-tuntap is now its own crate
Also fix some warnings
  • Loading branch information
mkj committed Aug 3, 2023
1 parent e1e36f8 commit ba40702
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 303 deletions.
96 changes: 54 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 14 additions & 13 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,21 @@ x25519-dalek = { git = "https://github.com/mkj/curve25519-dalek", branch = "suns
# ed25519-dalek = { path = "/home/matt/3rd/rs/crypto/curve25519-dalek/ed25519-dalek" }
# x25519-dalek = { path = "/home/matt/3rd/rs/crypto/curve25519-dalek/x25519-dalek" }

embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "2eb7a67c7027c6768fa95031caf60bcd0eade1ad" }
embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "2eb7a67c7027c6768fa95031caf60bcd0eade1ad" }
embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "2eb7a67c7027c6768fa95031caf60bcd0eade1ad" }
embassy-usb = { git = "https://github.com/embassy-rs/embassy", rev = "2eb7a67c7027c6768fa95031caf60bcd0eade1ad" }
embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "2eb7a67c7027c6768fa95031caf60bcd0eade1ad" }
embassy-usb-driver = { git = "https://github.com/embassy-rs/embassy", rev = "2eb7a67c7027c6768fa95031caf60bcd0eade1ad" }
embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "4d60c715e683aaadf25d9f066bde805c725fefb4" }
embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "4d60c715e683aaadf25d9f066bde805c725fefb4" }
embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "4d60c715e683aaadf25d9f066bde805c725fefb4" }
embassy-usb = { git = "https://github.com/embassy-rs/embassy", rev = "4d60c715e683aaadf25d9f066bde805c725fefb4" }
embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "4d60c715e683aaadf25d9f066bde805c725fefb4" }
embassy-usb-driver = { git = "https://github.com/embassy-rs/embassy", rev = "4d60c715e683aaadf25d9f066bde805c725fefb4" }
# for cyw43
embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "2eb7a67c7027c6768fa95031caf60bcd0eade1ad" }
embassy-net-driver-channel = { git = "https://github.com/embassy-rs/embassy", rev = "2eb7a67c7027c6768fa95031caf60bcd0eade1ad" }
embassy-net-driver = { git = "https://github.com/embassy-rs/embassy", rev = "2eb7a67c7027c6768fa95031caf60bcd0eade1ad" }

cyw43 = { git = "https://github.com/embassy-rs/embassy/", rev = "2eb7a67c7027c6768fa95031caf60bcd0eade1ad" }
cyw43-pio = { git = "https://github.com/embassy-rs/embassy/", rev = "2eb7a67c7027c6768fa95031caf60bcd0eade1ad" }
embassy-net-w5500 = { git = "https://github.com/embassy-rs/embassy/", rev = "2eb7a67c7027c6768fa95031caf60bcd0eade1ad" }
embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "4d60c715e683aaadf25d9f066bde805c725fefb4" }
embassy-net-driver-channel = { git = "https://github.com/embassy-rs/embassy", rev = "4d60c715e683aaadf25d9f066bde805c725fefb4" }
embassy-net-driver = { git = "https://github.com/embassy-rs/embassy", rev = "4d60c715e683aaadf25d9f066bde805c725fefb4" }
embassy-net-tuntap = { git = "https://github.com/embassy-rs/embassy", rev = "4d60c715e683aaadf25d9f066bde805c725fefb4" }

cyw43 = { git = "https://github.com/embassy-rs/embassy/", rev = "4d60c715e683aaadf25d9f066bde805c725fefb4" }
cyw43-pio = { git = "https://github.com/embassy-rs/embassy/", rev = "4d60c715e683aaadf25d9f066bde805c725fefb4" }
embassy-net-w5500 = { git = "https://github.com/embassy-rs/embassy/", rev = "4d60c715e683aaadf25d9f066bde805c725fefb4" }

# these are mostly applicable to picow, but can't hurt generally
[profile.dev]
Expand Down
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ MIT or Apache-2.0 license.
Copyright (c) 2019-2022 Embassy project contributors

embassy/demos/picow/src/wifi.rs
embassy/demos/std/src/tuntap.rs
embassy/demos/picow/src/w5500.rs

--
Expand Down
1 change: 0 additions & 1 deletion embassy/demos/common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ where
let prefix = SSHDecode::dec(s)?;
if prefix > 32 {
// emabassy panics, so test it here
debug!("Prefix {} > 32", prefix);
return Err(WireError::PacketWrong)
}
let gw: Option<[u8; 4]> = dec_option(s)?;
Expand Down
2 changes: 1 addition & 1 deletion embassy/demos/picow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ snafu = { version = "0.7", default-features = false, features = ["rust_1_61"] }
cortex-m = { version = "0.7.6", features = ["critical-section-single-core"]}
cortex-m-rt = "0.7.0"

embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.10" }
embedded-hal-1 = { package = "embedded-hal", version = "1.0.0-alpha.11" }
embedded-hal-async = { version = "0.2.0-alpha.1" }
embedded-io = { version = "0.4", features = ["async", "defmt"] }
heapless = "0.7.15"
Expand Down
2 changes: 1 addition & 1 deletion embassy/demos/std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ embassy-executor = { version = "0.1.0", default-features=false, features = ["lo
embassy-time = { version = "0.1", default-features=false, features = ["log", "std"] }
# embassy-net/nightly is required for asynch::Read/Write on TcpReader/TcpWriter
embassy-net = { version = "0.1.0", features = ["tcp", "dhcpv4", "medium-ethernet", "nightly"] }
embassy-net-driver = { version = "0.1.0" }
embassy-net-tuntap = { version = "0.1.0" }
embassy-sync = { version = "0.2.0" }
embassy-futures = { version = "0.1.0" }
atomic-polyfill = "0.1.5"
Expand Down
10 changes: 4 additions & 6 deletions embassy/demos/std/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use {
};

use embassy_executor::{Spawner, Executor};
use embassy_net::{Stack, StackResources, Config};
use embassy_net::{Stack, StackResources};
use static_cell::StaticCell;

use rand::rngs::OsRng;
Expand All @@ -18,13 +18,11 @@ use demo_common::menu::Runner as MenuRunner;
use embedded_io::asynch::Read;
use embassy_sync::signal::Signal;
use embassy_sync::blocking_mutex::raw::NoopRawMutex;

use crate::tuntap::TunTapDevice;
use embassy_net_tuntap::TunTapDevice;

use sunset::*;
use sunset_embassy::{SSHServer, SunsetMutex};

mod tuntap;
mod setupmenu;
pub(crate) use sunset_demo_embassy_common as demo_common;
use crate::demo_common::singleton;
Expand All @@ -47,7 +45,7 @@ async fn main_task(spawner: Spawner) {

let config = &*singleton!( {
let mut config = SSHConfig::new().unwrap();
// config.set_console_pw(Some("pw")).unwrap();
config.set_console_pw(Some("pw")).unwrap();
SunsetMutex::new(config)
} );

Expand Down Expand Up @@ -86,7 +84,7 @@ struct StdDemo {
impl DemoServer for StdDemo {
type Init = ();

fn new(init: &Self::Init) -> Self {
fn new(_init: &Self::Init) -> Self {
Default::default()
}

Expand Down
Loading

0 comments on commit ba40702

Please sign in to comment.