Skip to content

Async & blocking adaptors for the Wifi driver (supersedes #240)#243

Merged
ivmarkov merged 15 commits into
masterfrom
wifi_async
May 10, 2023
Merged

Async & blocking adaptors for the Wifi driver (supersedes #240)#243
ivmarkov merged 15 commits into
masterfrom
wifi_async

Conversation

@ivmarkov
Copy link
Copy Markdown
Collaborator

  • Took the existing PR from @pilotniq
  • Applied all my feedback
  • Made the wifi_async example buildable
  • Made all examples buildable, also as part of the CI

To build, use, e.g.:
cargo build --example wifi_async --target xtensa-esp32-espidf --features experimental,nightly

Comment thread src/wifi.rs
Comment thread src/wifi.rs
Comment thread examples/wifi_async.rs Outdated
pilotniq and others added 14 commits May 9, 2023 14:41
The stubs just block on the sync variants of the functions, and return a 'ready' future.
In a later iteration, the async functions that block can be replaced with proper futures.
Also added an example of using the async Wifi.

Feedback and comments welcome!
…nts.

The implementation of asynch::Wifi is still dependent on "experimental"
feature, because embedded-svc only exports the trait with "experimental".

`get_configuration`, `set_configuration`, `get_capabilities`, `is_started`,
and `is_connected` methds are not async in AsyncWifiDriver, because I don't
think it make sense since they return immediately on the ESP32 platform.
However, they still have async wrappers in the `asynch::Wifi`
implementation to fulfill that trait.
@ivmarkov ivmarkov force-pushed the wifi_async branch 4 times, most recently from 2c830a9 to e4483c3 Compare May 10, 2023 18:24
@ivmarkov ivmarkov merged commit 5816723 into master May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants