aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-12-27 01:19:26 +0100
committerDario Nieuwenhuis <[email protected]>2022-12-27 01:19:26 +0100
commit2548bbdd65fc3094f624bd043a1a9a296f9184b5 (patch)
treef3b50c80846dfb077cf16e6a223e7602a3c4aa1a /examples
parent1b6799d93f0bbd6154c124d51aa47aeed0acf15d (diff)
Update Embassy.
Diffstat (limited to 'examples')
-rw-r--r--examples/rpi-pico-w/Cargo.toml18
-rw-r--r--examples/rpi-pico-w/src/main.rs6
2 files changed, 13 insertions, 11 deletions
diff --git a/examples/rpi-pico-w/Cargo.toml b/examples/rpi-pico-w/Cargo.toml
index b817289e5..fa1cad8c7 100644
--- a/examples/rpi-pico-w/Cargo.toml
+++ b/examples/rpi-pico-w/Cargo.toml
@@ -9,7 +9,7 @@ cyw43 = { path = "../../", features = ["defmt", "firmware-logs"]}
9embassy-executor = { version = "0.1.0", features = ["defmt", "integrated-timers"] } 9embassy-executor = { version = "0.1.0", features = ["defmt", "integrated-timers"] }
10embassy-time = { version = "0.1.0", features = ["defmt", "defmt-timestamp-uptime"] } 10embassy-time = { version = "0.1.0", features = ["defmt", "defmt-timestamp-uptime"] }
11embassy-rp = { version = "0.1.0", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver"] } 11embassy-rp = { version = "0.1.0", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver"] }
12embassy-net = { version = "0.1.0", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "pool-16", "unstable-traits", "nightly"] } 12embassy-net = { version = "0.1.0", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "unstable-traits", "nightly"] }
13atomic-polyfill = "0.1.5" 13atomic-polyfill = "0.1.5"
14static_cell = "1.0" 14static_cell = "1.0"
15 15
@@ -28,12 +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 = "645fb66a5122bdc8180e0e65d076ca103431a426" } 31embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" }
32embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "645fb66a5122bdc8180e0e65d076ca103431a426" } 32embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" }
33embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "645fb66a5122bdc8180e0e65d076ca103431a426" } 33embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" }
34embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "645fb66a5122bdc8180e0e65d076ca103431a426" } 34embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" }
35embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "645fb66a5122bdc8180e0e65d076ca103431a426" } 35embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" }
36embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "645fb66a5122bdc8180e0e65d076ca103431a426" } 36embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" }
37embassy-net-driver = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" }
38embassy-net-driver-channel = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" }
37 39
38[profile.dev] 40[profile.dev]
39debug = 2 41debug = 2
@@ -43,7 +45,7 @@ overflow-checks = true
43 45
44[profile.release] 46[profile.release]
45codegen-units = 1 47codegen-units = 1
46debug = 2 48debug = 1
47debug-assertions = false 49debug-assertions = false
48incremental = false 50incremental = false
49lto = 'fat' 51lto = 'fat'
diff --git a/examples/rpi-pico-w/src/main.rs b/examples/rpi-pico-w/src/main.rs
index a19f38591..fd58e46df 100644
--- a/examples/rpi-pico-w/src/main.rs
+++ b/examples/rpi-pico-w/src/main.rs
@@ -34,7 +34,7 @@ async fn wifi_task(
34} 34}
35 35
36#[embassy_executor::task] 36#[embassy_executor::task]
37async fn net_task(stack: &'static Stack<cyw43::NetDevice<'static>>) -> ! { 37async fn net_task(stack: &'static Stack<cyw43::NetDriver<'static>>) -> ! {
38 stack.run().await 38 stack.run().await
39} 39}
40 40
@@ -66,11 +66,11 @@ async fn main(spawner: Spawner) {
66 let spi = ExclusiveDevice::new(bus, cs); 66 let spi = ExclusiveDevice::new(bus, cs);
67 67
68 let state = singleton!(cyw43::State::new()); 68 let state = singleton!(cyw43::State::new());
69 let (mut control, runner) = cyw43::new(state, pwr, spi, fw).await; 69 let (net_device, mut control, runner) = cyw43::new(state, pwr, spi, fw).await;
70 70
71 spawner.spawn(wifi_task(runner)).unwrap(); 71 spawner.spawn(wifi_task(runner)).unwrap();
72 72
73 let net_device = control.init(clm).await; 73 control.init(clm).await;
74 74
75 //control.join_open(env!("WIFI_NETWORK")).await; 75 //control.join_open(env!("WIFI_NETWORK")).await;
76 control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await; 76 control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await;