DRAFT: Use automatic light sleep for ESP32 alarm sleep#9559
Open
EternityForest wants to merge 4 commits intoadafruit:mainfrom
Open
DRAFT: Use automatic light sleep for ESP32 alarm sleep#9559EternityForest wants to merge 4 commits intoadafruit:mainfrom
EternityForest wants to merge 4 commits intoadafruit:mainfrom
Conversation
tannewt
requested changes
Aug 27, 2024
Member
tannewt
left a comment
There was a problem hiding this comment.
Thanks for the initial PR!
Any idea of what functionality will need to disable this light sleep and can you add the "disable" calls for that? Adding it here will make it easier when we find other things impacted by this change.
|
|
||
| #if CIRCUITPY_CONSOLE_UART | ||
| return true; | ||
| if (_console_uart_rx_timestamp && (_console_uart_rx_timestamp + (60 * 1024 * 5) > port_get_raw_ticks(NULL))) { |
Member
There was a problem hiding this comment.
Please breakout the 60 * 1024 * 5 into a macro that is documented with what it means.
Author
|
I'm not exactly sure what would need to disable it, but I think it should
be handled already by the ESP-IDF's wake locks API, the ESP won't sleep if
one of those is held
…On Tue, Aug 27, 2024, 2:56 PM Scott Shawcroft ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Thanks for the initial PR!
Any idea of what functionality will need to disable this light sleep and
can you add the "disable" calls for that? Adding it here will make it
easier when we find other things impacted by this change.
------------------------------
In supervisor/shared/serial.c
<#9559 (comment)>
:
> @@ -175,7 +180,9 @@ bool serial_connected(void) {
#endif
#if CIRCUITPY_CONSOLE_UART
- return true;
+ if (_console_uart_rx_timestamp && (_console_uart_rx_timestamp + (60 * 1024 * 5) > port_get_raw_ticks(NULL))) {
Please breakout the 60 * 1024 * 5 into a macro that is documented with
what it means.
—
Reply to this email directly, view it on GitHub
<#9559 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFZCH55QQ73PD2FN6GWX3LZTTRXNAVCNFSM6AAAAABNA32CRSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENRUGQZTMNJUGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Member
Ah ok. So we rely on the IDF to prevent sleep if we have things going on? Sounds good to me. |
Member
|
Anyone want to bring this up to date and do a final test for this? |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follows up on the conversation in #9463 and in Discord.
Draft PR, should be working but not tested in every possible way, posting for discussion purposes.
What this patch does: