Skip to content
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

Move feature suspend logic out of platform specific code #14210

Merged
merged 1 commit into from
Aug 30, 2021

Conversation

drashna
Copy link
Member

@drashna drashna commented Aug 29, 2021

Description

While looking to add OLED suspend support, noticed that a LOT of feature suspend code is duplicated in tmk_core/common/(platform)/suspend.c.

Moves out that code into quantum.c to be a common location for easier management.

And added oled/st7565 suspend support, too.

I'm not sure I like dumping it in quantum.c, but ...

Types of Changes

  • Core
  • Enhancement/optimization

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@drashna drashna requested a review from a team August 29, 2021 01:57
@github-actions github-actions bot added the core label Aug 29, 2021
@zvecr zvecr merged commit 15710db into qmk:develop Aug 30, 2021
@drashna drashna deleted the core/suspend branch September 3, 2021 05:12
firetech added a commit to firetech/qmk_firmware that referenced this pull request Feb 16, 2022
In qmk#14210, all previous calls to `suspend_power_down_kb()` were replaced
with calls to `suspend_power_down_quantum()`, together with some much
needed deduplication. However, the `_kb` function was never called from
the `_quantum` one (unlike `suspend_power_down_kb()`).

I followed the example of how it was implemented for AVR before qmk#14210,
i.e. called before the rest of the suspend functions, regardless of the
`NO_SUSPEND_POWER_DOWN` setting.

Fixes qmk#16279.
firetech added a commit to firetech/qmk_firmware that referenced this pull request Feb 17, 2022
In qmk#14210, all previous calls to `suspend_power_down_kb()` were replaced
with calls to `suspend_power_down_quantum()`, together with some much
needed deduplication. However, the `_kb` function was never called from
the `_quantum` one (unlike `suspend_wakeup_init_kb()`).

I followed the example of how it was implemented for AVR before qmk#14210,
i.e. called before the rest of the suspend functions, regardless of the
`NO_SUSPEND_POWER_DOWN` setting.

Fixes qmk#16279.
ptrxyz pushed a commit to ptrxyz/qmk_firmware that referenced this pull request Apr 9, 2022
@jaygreco jaygreco mentioned this pull request Nov 20, 2022
14 tasks
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants