Skip to content

Sleep API changes and fix for main.c silent issue #4503

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 1 commit into from
Apr 6, 2021
Merged

Sleep API changes and fix for main.c silent issue #4503

merged 1 commit into from
Apr 6, 2021

Conversation

hierophect
Copy link
Collaborator

@hierophect hierophect commented Mar 27, 2021

This PR adds the common_hal prefix to a number of sleep-related functions to identify that they are implemented on the port level, and adds the new weakly linked common_hal_alarm_pretending_deep_sleep function, which is required for both the NRF and STM32 sleep implementations. It also fixes a small problem with the deep sleep implementation in main.c, where the 5 second USB delay would set up to use port_idle_until_interrupt but never actually call it.

Result of a discussion with @dhalbert. Contains the api breaking elements of both #4388 and #4236, ideally it should be merged before/immediately after either of them so all implementations of Alarm can be on the same page going forward.

@hierophect hierophect requested a review from dhalbert March 27, 2021 18:25
@dhalbert dhalbert marked this pull request as draft March 29, 2021 20:12
@dhalbert
Copy link
Collaborator

I made this a draft just so it's not merged accidentally.

@hierophect
Copy link
Collaborator Author

@dhalbert There shouldn't be anything breaking the Circuitpython API in here, it'd just add extra work for @jun2sak if merged before their PR. If we merge NRF first, then I'll handle the merge here in this one.

@hierophect
Copy link
Collaborator Author

@dhalbert if you're ready to give this a review, I can handle the merging on the NRF port.

@hierophect hierophect marked this pull request as ready for review April 2, 2021 21:35
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These clarifications are good and fine with me!

@dhalbert dhalbert merged commit 82479b6 into adafruit:main Apr 6, 2021
@hierophect hierophect deleted the sleep-api-update branch April 9, 2021 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants