-
Notifications
You must be signed in to change notification settings - Fork 96
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
Split wifi state for AP and STA #288
Conversation
ddc902c
to
f76edc2
Compare
From a brief look this looks good to me. I think I'm fine with renaming the enum variants at this point of time. (t.b.h given the upcoming breaking changes in the next esp-hal release this is a really minor break) |
a0d43e9
to
4b2aa1c
Compare
1a75ced
to
9527bef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, shame about portable atomic but its something we can resolve in the future :)
Sooo... do you think we can move forward with this? 🙃 |
There two are new
Then I guess it's fine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Split wifi state for AP and STA * Use atomic enum to store state * Clean up unnecessary unsafe blocks
Closes #210
I wonder what to do with the combined
get_wifi_state()
function in the long run. If esp-wifi ever gets AP-STA support, picking one state will be difficult. Maybe the current "none of these modes? then invalid" logic will be good enough, or maybe that function can be removed altogether. I'm not sure.I've removed a bunch of possibilities from the set of states, based on what I found here. If it weren't a breaking change, I have also renamed the event-like
ApStop
, etc. enum variants to a more grammatically proper form (e.g.ApStopped
).