Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 15 commits into from
May 10, 2023

Conversation

ivmarkov
Copy link
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

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