diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-01-02 21:36:17 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-01-02 21:36:51 +0100 |
| commit | a2bae33d8460eee6c3af6f20a790f725cf2c5602 (patch) | |
| tree | bb102787f330a0b327500ae5327d1447b3de2e42 /examples | |
| parent | 001610f0d0b94859b8c8800dcdfa255343f2ea05 (diff) | |
Add separate function to set power management mode.
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/rpi-pico-w/src/main.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/rpi-pico-w/src/main.rs b/examples/rpi-pico-w/src/main.rs index 73cfdf42f..d2f47fd6c 100644 --- a/examples/rpi-pico-w/src/main.rs +++ b/examples/rpi-pico-w/src/main.rs | |||
| @@ -70,7 +70,10 @@ async fn main(spawner: Spawner) { | |||
| 70 | 70 | ||
| 71 | spawner.spawn(wifi_task(runner)).unwrap(); | 71 | spawner.spawn(wifi_task(runner)).unwrap(); |
| 72 | 72 | ||
| 73 | control.init(clm, cyw43::PowerManagementMode::PowerSave).await; | 73 | control.init(clm).await; |
| 74 | control | ||
| 75 | .set_power_management(cyw43::PowerManagementMode::PowerSave) | ||
| 76 | .await; | ||
| 74 | 77 | ||
| 75 | //control.join_open(env!("WIFI_NETWORK")).await; | 78 | //control.join_open(env!("WIFI_NETWORK")).await; |
| 76 | control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await; | 79 | control.join_wpa2(env!("WIFI_NETWORK"), env!("WIFI_PASSWORD")).await; |
