Pre beta fixups#5605
Conversation
There was a problem hiding this comment.
Pull request overview
This PR performs a set of pre-beta API and documentation cleanups in esp-radio, primarily restructuring the Wi-Fi controller construction API and reorganizing Wi-Fi event/info types, with corresponding updates across examples and test binaries.
Changes:
- Replace the free function
esp_radio::wifi::new()with the associated constructorWifiController::new(). - Move station/AP connection event/info types into
wifi::staandwifi::apmodules, updating call sites accordingly. - Gate
AccessPointConfigbuilder methodswith_max_connections()andwith_dtim_period()behind theunstablefeature and refresh crate-level documentation.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| qa-test/src/bin/wifi_syslog.rs | Update Wi-Fi controller creation to WifiController::new(). |
| qa-test/src/bin/wifi_survives_ble_drop.rs | Update Wi-Fi controller creation to WifiController::new(). |
| qa-test/src/bin/embassy_wifi_stress.rs | Update Wi-Fi controller creation to WifiController::new() (with formatting changes). |
| qa-test/src/bin/embassy_wifi_i2s.rs | Update Wi-Fi controller creation to WifiController::new(). |
| qa-test/src/bin/embassy_wifi_drop.rs | Update Wi-Fi controller creation to WifiController::new() in both test sections. |
| qa-test/src/bin/embassy_wifi_csi.rs | Update Wi-Fi controller creation to WifiController::new(). |
| qa-test/src/bin/embassy_wifi_bench.rs | Update Wi-Fi controller creation to WifiController::new(). |
| qa-test/src/bin/embassy_scan_after_sleep.rs | Update Wi-Fi controller creation to WifiController::new() (with formatting changes). |
| hil-test/src/bin/esp_radio/wifi_controller.rs | Update Wi-Fi init in HIL tests to WifiController::new(). |
| hil-test/src/bin/esp_radio/init_tests.rs | Update init/teardown tests to WifiController::new() (including CS/interrupt-free cases). |
| examples/wifi/sniffer/src/main.rs | Update Wi-Fi controller creation to WifiController::new(). |
| examples/wifi/embassy_sntp/src/main.rs | Update Wi-Fi controller creation to WifiController::new(). |
| examples/wifi/embassy_dhcp/src/main.rs | Update Wi-Fi controller creation to WifiController::new(). |
| examples/wifi/embassy_coex/src/main.rs | Update Wi-Fi controller creation to WifiController::new(). |
| examples/wifi/embassy_access_point/src/main.rs | Update Wi-Fi controller creation + AP station event type paths (wifi::ap::...). |
| examples/wifi/embassy_access_point_with_sta/src/main.rs | Update Wi-Fi controller creation + AP station event type paths (wifi::ap::...). |
| examples/wifi/80211_tx/src/main.rs | Update Wi-Fi controller creation to WifiController::new(). |
| examples/esp-now/embassy_esp_now/src/main.rs | Update Wi-Fi controller creation to WifiController::new() for ESP-NOW setup. |
| examples/esp-now/embassy_esp_now_duplex/src/main.rs | Update Wi-Fi controller creation to WifiController::new() inside mk_static!. |
| esp-radio/src/wifi/sta/mod.rs | Relocate station connected/disconnected info types into wifi::sta. |
| esp-radio/src/wifi/mod.rs | Move new() into WifiController::new(), reorganize imports, and update docs/examples in rustdoc. |
| esp-radio/src/wifi/event.rs | Update rustdoc references to the new constructor path. |
| esp-radio/src/wifi/ap.rs | Gate AP config builder methods behind unstable and relocate AP station event/info types into wifi::ap. |
| esp-radio/src/lib.rs | Restructure crate-level docs (overview/quick start/examples/links) and update Wi-Fi snippet to WifiController::new(). |
|
It's maybe just me but somehow this reads confusing 🤔 : esp_radio::wifi::ap::EventInfo::Connected(info) => {
println!("Station connected: {:?}", info);
}
esp_radio::wifi::ap::EventInfo::Disconnected(info) => {
println!("Station disconnected: {:?}", info);
}i.e. |
| /// The SSID of the connected station. | ||
| pub ssid: Ssid, | ||
| /// The BSSID of the connected station. | ||
| pub bssid: [u8; 6], |
| /// The SSID of the disconnected station. | ||
| pub ssid: Ssid, | ||
| /// The BSSID of the disconnected station. | ||
| pub bssid: [u8; 6], |
| //! ## Optimization level | ||
| //! | ||
| //! To make it work also for your debug builds add this to your `Cargo.toml` | ||
| //! The radio blobs require optimization level 2 or 3 to function correctly. |
There was a problem hiding this comment.
The blobs are precompiled, what actually requires the high optimization level?
There was a problem hiding this comment.
I suspect its actually the scheduler, not really the blobs but haven't tested.
Please review commit by commit.