Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Technically this would resolve the "state functions should be removed" part of #4364
It actually makes the functions private since we use them a lot internally - this also adds some intermediate states.
At least internally there is value in maintaining a WiFi state machine (unfortunately the drivers don't expose that - while they have it internally for sure)
Ironically only the async examples were using that API 🙃
Before blindly trying to mirror the async-wait-for-event API I wondered if the async counterpart is really something we want to stabilize (or even expose at all) as is?
It's easy to miss an event even with these (by willingly or by accident). (By just waiting for the event after the fact)
Wouldn't an async iteratator style API be better (and handling all the events in one place)? (And then ... the only way to not miss events for blocking would be something callback based (or a queue if the user polls it fast enough to not miss anything))
Maybe it's all fine but I have a feeling we should think about this before committing to anything - probably something to think about during the weekend :)
DRAFT since we should have an idea how to proceed with this first