diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-07-05 17:44:46 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-05 17:44:46 +0000 |
| commit | a77fb0f630be9c7158f81e4b0ca7bd5e88d56dd0 (patch) | |
| tree | 91ed76f9b7cf79ea77adea30424ae061b8a5721d /examples | |
| parent | 8313b7315a960fc470d148fdb1410c00d1f75ed1 (diff) | |
| parent | a42ac86f1b71700632b77196ad506587774ae976 (diff) | |
Merge pull request #1622 from embassy-rs/misc-fixes
Downgrade nightly, misc fixes
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/nrf52840/src/bin/wifi_esp_hosted.rs | 5 | ||||
| -rw-r--r-- | examples/rp/src/bin/wifi_tcp_server.rs | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/examples/nrf52840/src/bin/wifi_esp_hosted.rs b/examples/nrf52840/src/bin/wifi_esp_hosted.rs index f7496703c..112e41bcd 100644 --- a/examples/nrf52840/src/bin/wifi_esp_hosted.rs +++ b/examples/nrf52840/src/bin/wifi_esp_hosted.rs | |||
| @@ -16,6 +16,9 @@ use embedded_io::asynch::Write; | |||
| 16 | use static_cell::make_static; | 16 | use static_cell::make_static; |
| 17 | use {defmt_rtt as _, embassy_net_esp_hosted as hosted, panic_probe as _}; | 17 | use {defmt_rtt as _, embassy_net_esp_hosted as hosted, panic_probe as _}; |
| 18 | 18 | ||
| 19 | const WIFI_NETWORK: &str = "EmbassyTest"; | ||
| 20 | const WIFI_PASSWORD: &str = "V8YxhKt5CdIAJFud"; | ||
| 21 | |||
| 19 | bind_interrupts!(struct Irqs { | 22 | bind_interrupts!(struct Irqs { |
| 20 | SPIM3 => spim::InterruptHandler<peripherals::SPI3>; | 23 | SPIM3 => spim::InterruptHandler<peripherals::SPI3>; |
| 21 | RNG => embassy_nrf::rng::InterruptHandler<peripherals::RNG>; | 24 | RNG => embassy_nrf::rng::InterruptHandler<peripherals::RNG>; |
| @@ -70,7 +73,7 @@ async fn main(spawner: Spawner) { | |||
| 70 | unwrap!(spawner.spawn(wifi_task(runner))); | 73 | unwrap!(spawner.spawn(wifi_task(runner))); |
| 71 | 74 | ||
| 72 | control.init().await; | 75 | control.init().await; |
| 73 | control.join(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await; | 76 | control.join(WIFI_NETWORK, WIFI_PASSWORD).await; |
| 74 | 77 | ||
| 75 | let config = embassy_net::Config::dhcpv4(Default::default()); | 78 | let config = embassy_net::Config::dhcpv4(Default::default()); |
| 76 | // let config = embassy_net::Config::ipv4_static(embassy_net::StaticConfigV4 { | 79 | // let config = embassy_net::Config::ipv4_static(embassy_net::StaticConfigV4 { |
diff --git a/examples/rp/src/bin/wifi_tcp_server.rs b/examples/rp/src/bin/wifi_tcp_server.rs index e9d1079a6..197535f45 100644 --- a/examples/rp/src/bin/wifi_tcp_server.rs +++ b/examples/rp/src/bin/wifi_tcp_server.rs | |||
| @@ -19,6 +19,9 @@ use embedded_io::asynch::Write; | |||
| 19 | use static_cell::make_static; | 19 | use static_cell::make_static; |
| 20 | use {defmt_rtt as _, panic_probe as _}; | 20 | use {defmt_rtt as _, panic_probe as _}; |
| 21 | 21 | ||
| 22 | const WIFI_NETWORK: &str = "EmbassyTest"; | ||
| 23 | const WIFI_PASSWORD: &str = "V8YxhKt5CdIAJFud"; | ||
| 24 | |||
| 22 | #[embassy_executor::task] | 25 | #[embassy_executor::task] |
| 23 | async fn wifi_task( | 26 | async fn wifi_task( |
| 24 | runner: cyw43::Runner<'static, Output<'static, PIN_23>, PioSpi<'static, PIN_25, PIO0, 0, DMA_CH0>>, | 27 | runner: cyw43::Runner<'static, Output<'static, PIN_23>, PioSpi<'static, PIN_25, PIO0, 0, DMA_CH0>>, |
| @@ -82,8 +85,8 @@ async fn main(spawner: Spawner) { | |||
| 82 | unwrap!(spawner.spawn(net_task(stack))); | 85 | unwrap!(spawner.spawn(net_task(stack))); |
| 83 | 86 | ||
| 84 | loop { | 87 | loop { |
| 85 | //control.join_open(env!("WIFI_NETWORK")).await; | 88 | //control.join_open(WIFI_NETWORK).await; |
| 86 | match control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await { | 89 | match control.join_wpa2(WIFI_NETWORK, WIFI_PASSWORD).await { |
| 87 | Ok(_) => break, | 90 | Ok(_) => break, |
| 88 | Err(err) => { | 91 | Err(err) => { |
| 89 | info!("join failed with status={}", err.status); | 92 | info!("join failed with status={}", err.status); |
