-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Experimental: add new WiFi (pseudo) modes: WIFI_SHUTDOWN & WIFI_RESUME #6356
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
72dc2d7
add new WiFimodes: WIFI_SHUTDOWN & WIFI_RESUME with example
d-a-v 16ac25a
remove useless variable
d-a-v 44b84a2
per CI review (lwip1, emulation)
d-a-v db5e6af
fix style
d-a-v 31cddd3
reorder structure members
d-a-v 7f2e3e6
WiFi.mode state parameter: only useful with SHUTDOWN or RESUME
d-a-v ca163a8
state saving was initially part of the shutdown function
d-a-v 68f9796
fix example to be consistent
d-a-v 1726798
poison saved sate structure on success, per suggestion on maintainers…
d-a-v f7f6e33
Merge branch 'master' into shutdown
d-a-v 1700c97
Merge branch 'master' into shutdown
d-a-v 0d8f787
comment (mention experimental)
d-a-v 9d6e293
Merge branch 'master' into shutdown
d-a-v 6b9cb4e
Merge branch 'master' into shutdown
d-a-v 6fb0a34
comments
d-a-v 6e1c44e
unify crc32 calls
d-a-v 41012b1
Merge branch 'master' into shutdown
d-a-v File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
#include "coredecls.h" | ||
|
||
// taken from esp8266/examples/RTCUserMemory/RTCUserMemory.ino | ||
uint32_t crc32 (const void* data, size_t length) | ||
{ | ||
const uint8_t* ldata = (const uint8_t*)data; | ||
uint32_t crc = 0xffffffff; | ||
while (length--) | ||
{ | ||
uint8_t c = *ldata++; | ||
for (uint32_t i = 0x80; i > 0; i >>= 1) | ||
{ | ||
bool bit = crc & 0x80000000; | ||
if (c & i) | ||
bit = !bit; | ||
crc <<= 1; | ||
if (bit) | ||
crc ^= 0x04c11db7; | ||
} | ||
} | ||
return crc; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.