diff options
Diffstat (limited to 'examples/std')
| -rw-r--r-- | examples/std/Cargo.toml | 4 | ||||
| -rw-r--r-- | examples/std/src/bin/net.rs | 7 | ||||
| -rw-r--r-- | examples/std/src/bin/net_dns.rs | 7 | ||||
| -rw-r--r-- | examples/std/src/bin/net_ppp.rs | 2 | ||||
| -rw-r--r-- | examples/std/src/bin/net_udp.rs | 7 | ||||
| -rw-r--r-- | examples/std/src/bin/tcp_accept.rs | 7 |
6 files changed, 7 insertions, 27 deletions
diff --git a/examples/std/Cargo.toml b/examples/std/Cargo.toml index 58ea894f3..87491b1d2 100644 --- a/examples/std/Cargo.toml +++ b/examples/std/Cargo.toml | |||
| @@ -6,8 +6,8 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | embassy-sync = { version = "0.6.0", path = "../../embassy-sync", features = ["log"] } | 8 | embassy-sync = { version = "0.6.0", path = "../../embassy-sync", features = ["log"] } |
| 9 | embassy-executor = { version = "0.5.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-std", "executor-thread", "log", "integrated-timers"] } | 9 | embassy-executor = { version = "0.6.0", path = "../../embassy-executor", features = ["task-arena-size-32768", "arch-std", "executor-thread", "log", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.3.1", path = "../../embassy-time", features = ["log", "std", ] } | 10 | embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["log", "std", ] } |
| 11 | embassy-net = { version = "0.4.0", path = "../../embassy-net", features=[ "std", "log", "medium-ethernet", "medium-ip", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6"] } | 11 | embassy-net = { version = "0.4.0", path = "../../embassy-net", features=[ "std", "log", "medium-ethernet", "medium-ip", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6"] } |
| 12 | embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" } | 12 | embassy-net-tuntap = { version = "0.1.0", path = "../../embassy-net-tuntap" } |
| 13 | embassy-net-ppp = { version = "0.1.0", path = "../../embassy-net-ppp", features = ["log"]} | 13 | embassy-net-ppp = { version = "0.1.0", path = "../../embassy-net-ppp", features = ["log"]} |
diff --git a/examples/std/src/bin/net.rs b/examples/std/src/bin/net.rs index 59813d8cb..310e7264d 100644 --- a/examples/std/src/bin/net.rs +++ b/examples/std/src/bin/net.rs | |||
| @@ -52,12 +52,7 @@ async fn main_task(spawner: Spawner) { | |||
| 52 | // Init network stack | 52 | // Init network stack |
| 53 | static STACK: StaticCell<Stack<TunTapDevice>> = StaticCell::new(); | 53 | static STACK: StaticCell<Stack<TunTapDevice>> = StaticCell::new(); |
| 54 | static RESOURCES: StaticCell<StackResources<3>> = StaticCell::new(); | 54 | static RESOURCES: StaticCell<StackResources<3>> = StaticCell::new(); |
| 55 | let stack = &*STACK.init(Stack::new( | 55 | let stack = &*STACK.init(Stack::new(device, config, RESOURCES.init(StackResources::new()), seed)); |
| 56 | device, | ||
| 57 | config, | ||
| 58 | RESOURCES.init(StackResources::<3>::new()), | ||
| 59 | seed, | ||
| 60 | )); | ||
| 61 | 56 | ||
| 62 | // Launch network task | 57 | // Launch network task |
| 63 | spawner.spawn(net_task(stack)).unwrap(); | 58 | spawner.spawn(net_task(stack)).unwrap(); |
diff --git a/examples/std/src/bin/net_dns.rs b/examples/std/src/bin/net_dns.rs index 3b6a3de37..c9615ef35 100644 --- a/examples/std/src/bin/net_dns.rs +++ b/examples/std/src/bin/net_dns.rs | |||
| @@ -51,12 +51,7 @@ async fn main_task(spawner: Spawner) { | |||
| 51 | // Init network stack | 51 | // Init network stack |
| 52 | static STACK: StaticCell<Stack<TunTapDevice>> = StaticCell::new(); | 52 | static STACK: StaticCell<Stack<TunTapDevice>> = StaticCell::new(); |
| 53 | static RESOURCES: StaticCell<StackResources<3>> = StaticCell::new(); | 53 | static RESOURCES: StaticCell<StackResources<3>> = StaticCell::new(); |
| 54 | let stack: &Stack<_> = &*STACK.init(Stack::new( | 54 | let stack: &Stack<_> = &*STACK.init(Stack::new(device, config, RESOURCES.init(StackResources::new()), seed)); |
| 55 | device, | ||
| 56 | config, | ||
| 57 | RESOURCES.init(StackResources::<3>::new()), | ||
| 58 | seed, | ||
| 59 | )); | ||
| 60 | 55 | ||
| 61 | // Launch network task | 56 | // Launch network task |
| 62 | spawner.spawn(net_task(stack)).unwrap(); | 57 | spawner.spawn(net_task(stack)).unwrap(); |
diff --git a/examples/std/src/bin/net_ppp.rs b/examples/std/src/bin/net_ppp.rs index 9ec0ea91f..c5c27c4a3 100644 --- a/examples/std/src/bin/net_ppp.rs +++ b/examples/std/src/bin/net_ppp.rs | |||
| @@ -102,7 +102,7 @@ async fn main_task(spawner: Spawner) { | |||
| 102 | let stack = &*STACK.init(Stack::new( | 102 | let stack = &*STACK.init(Stack::new( |
| 103 | device, | 103 | device, |
| 104 | Config::default(), // don't configure IP yet | 104 | Config::default(), // don't configure IP yet |
| 105 | RESOURCES.init(StackResources::<3>::new()), | 105 | RESOURCES.init(StackResources::new()), |
| 106 | seed, | 106 | seed, |
| 107 | )); | 107 | )); |
| 108 | 108 | ||
diff --git a/examples/std/src/bin/net_udp.rs b/examples/std/src/bin/net_udp.rs index bee91990d..b2ba4915a 100644 --- a/examples/std/src/bin/net_udp.rs +++ b/examples/std/src/bin/net_udp.rs | |||
| @@ -50,12 +50,7 @@ async fn main_task(spawner: Spawner) { | |||
| 50 | // Init network stack | 50 | // Init network stack |
| 51 | static STACK: StaticCell<Stack<TunTapDevice>> = StaticCell::new(); | 51 | static STACK: StaticCell<Stack<TunTapDevice>> = StaticCell::new(); |
| 52 | static RESOURCES: StaticCell<StackResources<3>> = StaticCell::new(); | 52 | static RESOURCES: StaticCell<StackResources<3>> = StaticCell::new(); |
| 53 | let stack = &*STACK.init(Stack::new( | 53 | let stack = &*STACK.init(Stack::new(device, config, RESOURCES.init(StackResources::new()), seed)); |
| 54 | device, | ||
| 55 | config, | ||
| 56 | RESOURCES.init(StackResources::<3>::new()), | ||
| 57 | seed, | ||
| 58 | )); | ||
| 59 | 54 | ||
| 60 | // Launch network task | 55 | // Launch network task |
| 61 | spawner.spawn(net_task(stack)).unwrap(); | 56 | spawner.spawn(net_task(stack)).unwrap(); |
diff --git a/examples/std/src/bin/tcp_accept.rs b/examples/std/src/bin/tcp_accept.rs index e8b6eaa6c..39b29a449 100644 --- a/examples/std/src/bin/tcp_accept.rs +++ b/examples/std/src/bin/tcp_accept.rs | |||
| @@ -64,12 +64,7 @@ async fn main_task(spawner: Spawner) { | |||
| 64 | // Init network stack | 64 | // Init network stack |
| 65 | static STACK: StaticCell<Stack<TunTapDevice>> = StaticCell::new(); | 65 | static STACK: StaticCell<Stack<TunTapDevice>> = StaticCell::new(); |
| 66 | static RESOURCES: StaticCell<StackResources<3>> = StaticCell::new(); | 66 | static RESOURCES: StaticCell<StackResources<3>> = StaticCell::new(); |
| 67 | let stack = &*STACK.init(Stack::new( | 67 | let stack = &*STACK.init(Stack::new(device, config, RESOURCES.init(StackResources::new()), seed)); |
| 68 | device, | ||
| 69 | config, | ||
| 70 | RESOURCES.init(StackResources::<3>::new()), | ||
| 71 | seed, | ||
| 72 | )); | ||
| 73 | 68 | ||
| 74 | // Launch network task | 69 | // Launch network task |
| 75 | spawner.spawn(net_task(stack)).unwrap(); | 70 | spawner.spawn(net_task(stack)).unwrap(); |
