aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAaron Tsui <[email protected]>2023-02-15 11:08:27 +0800
committerAaron Tsui <[email protected]>2023-02-15 11:08:27 +0800
commit0bcd1b1e10e0edefa520ba3f293d34367b416c99 (patch)
treef5e68bb2d5d6307accfc88b751f2a28b2446fa1b /examples
parent9900ac2c9a1e5c4ad2a30b2057f25cb19a27369b (diff)
update embassy dependences
Diffstat (limited to 'examples')
-rw-r--r--examples/rpi-pico-w/Cargo.toml16
-rw-r--r--examples/rpi-pico-w/src/main.rs8
2 files changed, 12 insertions, 12 deletions
diff --git a/examples/rpi-pico-w/Cargo.toml b/examples/rpi-pico-w/Cargo.toml
index fa1cad8c7..99b82ca31 100644
--- a/examples/rpi-pico-w/Cargo.toml
+++ b/examples/rpi-pico-w/Cargo.toml
@@ -28,14 +28,14 @@ heapless = "0.7.15"
28 28
29 29
30[patch.crates-io] 30[patch.crates-io]
31embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } 31embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" }
32embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } 32embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" }
33embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } 33embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" }
34embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } 34embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" }
35embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } 35embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" }
36embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } 36embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" }
37embassy-net-driver = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } 37embassy-net-driver = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" }
38embassy-net-driver-channel = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } 38embassy-net-driver-channel = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" }
39 39
40[profile.dev] 40[profile.dev]
41debug = 2 41debug = 2
diff --git a/examples/rpi-pico-w/src/main.rs b/examples/rpi-pico-w/src/main.rs
index d2f47fd6c..71459a122 100644
--- a/examples/rpi-pico-w/src/main.rs
+++ b/examples/rpi-pico-w/src/main.rs
@@ -9,7 +9,7 @@ use core::convert::Infallible;
9use defmt::*; 9use defmt::*;
10use embassy_executor::Spawner; 10use embassy_executor::Spawner;
11use embassy_net::tcp::TcpSocket; 11use embassy_net::tcp::TcpSocket;
12use embassy_net::{Stack, StackResources}; 12use embassy_net::{Config, Stack, StackResources};
13use embassy_rp::gpio::{Flex, Level, Output}; 13use embassy_rp::gpio::{Flex, Level, Output};
14use embassy_rp::peripherals::{PIN_23, PIN_24, PIN_25, PIN_29}; 14use embassy_rp::peripherals::{PIN_23, PIN_24, PIN_25, PIN_29};
15use embedded_hal_1::spi::ErrorType; 15use embedded_hal_1::spi::ErrorType;
@@ -78,8 +78,8 @@ async fn main(spawner: Spawner) {
78 //control.join_open(env!("WIFI_NETWORK")).await; 78 //control.join_open(env!("WIFI_NETWORK")).await;
79 control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await; 79 control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await;
80 80
81 let config = embassy_net::ConfigStrategy::Dhcp; 81 let config = Config::Dhcp(Default::default());
82 //let config = embassy_net::ConfigStrategy::Static(embassy_net::Config { 82 //let config = embassy_net::Config::Static(embassy_net::Config {
83 // address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24), 83 // address: Ipv4Cidr::new(Ipv4Address::new(192, 168, 69, 2), 24),
84 // dns_servers: Vec::new(), 84 // dns_servers: Vec::new(),
85 // gateway: Some(Ipv4Address::new(192, 168, 69, 1)), 85 // gateway: Some(Ipv4Address::new(192, 168, 69, 1)),
@@ -92,7 +92,7 @@ async fn main(spawner: Spawner) {
92 let stack = &*singleton!(Stack::new( 92 let stack = &*singleton!(Stack::new(
93 net_device, 93 net_device,
94 config, 94 config,
95 singleton!(StackResources::<1, 2, 8>::new()), 95 singleton!(StackResources::<2>::new()),
96 seed 96 seed
97 )); 97 ));
98 98