-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Extending on the new WiFi-less startup and new power saving APIs in ESP class #7979
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
810fed9
a1ceef3
9538ef9
1ecdfc1
ef2bc95
9891613
ea94626
7137d0f
7fea539
446aea7
6a07829
49c2ac0
e7864f1
79a7ee8
788731e
433cd17
24efea2
83e70ee
c0326f0
7c4879f
01eb942
382f6fd
213a2e0
56c40f3
affc7fc
6015cec
b6e14f6
ad454ea
74951fd
0a70272
df7e909
1af1380
a9d9cda
e8798ac
3fc7d23
abd17a7
a6d1f73
5a2c2db
2d1cb1c
9847e1f
b8a95de
dd6ea93
6252680
cd6d155
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
…nter when it is no longer needed.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,9 +168,9 @@ bool EspClass::forcedModemSleep(uint32_t duration_us, fpm_wakeup_cb wakeupCb) | |
} | ||
// SDK turns on forced modem sleep in idle task | ||
#ifdef HAVE_ESP_SUSPEND | ||
esp_delay(1); | ||
esp_delay(10); | ||
#else | ||
delay(1); | ||
delay(10); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we waiting for certain condition to happen? Should it check something instead of assuming 10ms delay does something? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your opinion may differ, even for a reason, but I implement to the public specification and as my comment |
||
#endif | ||
return true; | ||
} | ||
|
@@ -269,9 +269,18 @@ void EspClass::forcedLightSleepEnd(bool cancel) | |
esp8266::InterruptLock lock; | ||
timer_list = saved_timer_list; | ||
} | ||
saved_wakeupCb = nullptr; | ||
wifi_fpm_close(); | ||
wifi_fpm_set_sleep_type(saved_sleep_type); | ||
saved_sleep_type = NONE_SLEEP_T; | ||
if (cancel) { | ||
// let the SDK catch up in idle task | ||
#ifdef HAVE_ESP_SUSPEND | ||
mcspr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
esp_delay(10); | ||
#else | ||
delay(10); | ||
#endif | ||
} | ||
} | ||
|
||
void EspClass::autoModemSleep() { | ||
|
Uh oh!
There was an error while loading. Please reload this page.