diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-12-27 01:19:26 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-12-27 01:19:26 +0100 |
| commit | 2548bbdd65fc3094f624bd043a1a9a296f9184b5 (patch) | |
| tree | f3b50c80846dfb077cf16e6a223e7602a3c4aa1a /examples | |
| parent | 1b6799d93f0bbd6154c124d51aa47aeed0acf15d (diff) | |
Update Embassy.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/rpi-pico-w/Cargo.toml | 18 | ||||
| -rw-r--r-- | examples/rpi-pico-w/src/main.rs | 6 |
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"]} | |||
| 9 | embassy-executor = { version = "0.1.0", features = ["defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.1.0", features = ["defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.1.0", features = ["defmt", "defmt-timestamp-uptime"] } | 10 | embassy-time = { version = "0.1.0", features = ["defmt", "defmt-timestamp-uptime"] } |
| 11 | embassy-rp = { version = "0.1.0", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver"] } | 11 | embassy-rp = { version = "0.1.0", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver"] } |
| 12 | embassy-net = { version = "0.1.0", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "pool-16", "unstable-traits", "nightly"] } | 12 | embassy-net = { version = "0.1.0", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", "unstable-traits", "nightly"] } |
| 13 | atomic-polyfill = "0.1.5" | 13 | atomic-polyfill = "0.1.5" |
| 14 | static_cell = "1.0" | 14 | static_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] |
| 31 | embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "645fb66a5122bdc8180e0e65d076ca103431a426" } | 31 | embassy-executor = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } |
| 32 | embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "645fb66a5122bdc8180e0e65d076ca103431a426" } | 32 | embassy-time = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } |
| 33 | embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "645fb66a5122bdc8180e0e65d076ca103431a426" } | 33 | embassy-futures = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } |
| 34 | embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "645fb66a5122bdc8180e0e65d076ca103431a426" } | 34 | embassy-sync = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } |
| 35 | embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "645fb66a5122bdc8180e0e65d076ca103431a426" } | 35 | embassy-rp = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } |
| 36 | embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "645fb66a5122bdc8180e0e65d076ca103431a426" } | 36 | embassy-net = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } |
| 37 | embassy-net-driver = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } | ||
| 38 | embassy-net-driver-channel = { git = "https://github.com/embassy-rs/embassy", rev = "771806be790a2758f1314d6460defe7c2f0d3e99" } | ||
| 37 | 39 | ||
| 38 | [profile.dev] | 40 | [profile.dev] |
| 39 | debug = 2 | 41 | debug = 2 |
| @@ -43,7 +45,7 @@ overflow-checks = true | |||
| 43 | 45 | ||
| 44 | [profile.release] | 46 | [profile.release] |
| 45 | codegen-units = 1 | 47 | codegen-units = 1 |
| 46 | debug = 2 | 48 | debug = 1 |
| 47 | debug-assertions = false | 49 | debug-assertions = false |
| 48 | incremental = false | 50 | incremental = false |
| 49 | lto = 'fat' | 51 | lto = '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] |
| 37 | async fn net_task(stack: &'static Stack<cyw43::NetDevice<'static>>) -> ! { | 37 | async 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; |
