diff options
| author | Aaron Tsui <[email protected]> | 2023-02-15 11:08:27 +0800 |
|---|---|---|
| committer | Aaron Tsui <[email protected]> | 2023-02-15 11:08:27 +0800 |
| commit | 0bcd1b1e10e0edefa520ba3f293d34367b416c99 (patch) | |
| tree | f5e68bb2d5d6307accfc88b751f2a28b2446fa1b /examples | |
| parent | 9900ac2c9a1e5c4ad2a30b2057f25cb19a27369b (diff) | |
update embassy dependences
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/rpi-pico-w/Cargo.toml | 16 | ||||
| -rw-r--r-- | examples/rpi-pico-w/src/main.rs | 8 |
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] |
| 31 | embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } | 31 | embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" } |
| 32 | embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } | 32 | embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" } |
| 33 | embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } | 33 | embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" } |
| 34 | embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } | 34 | embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" } |
| 35 | embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } | 35 | embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" } |
| 36 | embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } | 36 | embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" } |
| 37 | embassy-net-driver = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } | 37 | embassy-net-driver = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" } |
| 38 | embassy-net-driver-channel = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } | 38 | embassy-net-driver-channel = { git = "https://github.com/embassy-rs/embassy", rev = "e3f8020c3bdf726dfa451b5b190f27191507a18f" } |
| 39 | 39 | ||
| 40 | [profile.dev] | 40 | [profile.dev] |
| 41 | debug = 2 | 41 | debug = 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; | |||
| 9 | use defmt::*; | 9 | use defmt::*; |
| 10 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
| 11 | use embassy_net::tcp::TcpSocket; | 11 | use embassy_net::tcp::TcpSocket; |
| 12 | use embassy_net::{Stack, StackResources}; | 12 | use embassy_net::{Config, Stack, StackResources}; |
| 13 | use embassy_rp::gpio::{Flex, Level, Output}; | 13 | use embassy_rp::gpio::{Flex, Level, Output}; |
| 14 | use embassy_rp::peripherals::{PIN_23, PIN_24, PIN_25, PIN_29}; | 14 | use embassy_rp::peripherals::{PIN_23, PIN_24, PIN_25, PIN_29}; |
| 15 | use embedded_hal_1::spi::ErrorType; | 15 | use 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 | ||
