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

Reuse of EEPROM debounce logic #14699

Merged
merged 4 commits into from
Oct 7, 2021
Merged

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Oct 4, 2021

Description

Partially borrowed from RGB Matrix, the idea is to provide debounce of arbitrary sections of EEPROM.

Ideally the process would be completely transparent, but minimising the RAM/execution overhead is tricky. For example, with STM eeprom emulation you would end up with a write log on top of a write log. Implementing linked lists/maps, to store only the most recent changes burns extra cycles to get the latest value. The RGB Matrix tracks the changes of its own block of data, with a periodic write. This has been generalised a little with some gross macros, but should help with some consistency in behaviour.

For some additional context, this is some WIP of the additional use case -18ee1f5.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

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).

@github-actions github-actions bot added the core label Oct 4, 2021
@zvecr zvecr changed the title Reuse of RGB Matrix debounce logic Reuse of EEPROM debounce logic Oct 4, 2021
@zvecr zvecr marked this pull request as ready for review October 5, 2021 16:55
@zvecr zvecr requested a review from a team October 5, 2021 16:55
@zvecr zvecr merged commit 60297a1 into qmk:develop Oct 7, 2021
@drashna
Copy link
Member

drashna commented Oct 7, 2021

Looks like this broke via, because it calls rgblight's version, which is mapped to rgb matrix, for compatibility.

cadusk pushed a commit to cadusk/qmk_firmware that referenced this pull request Oct 7, 2021
* qmk/develop: (47 commits)
  Correct the Turkish F '?' keycode (TR_QUES) (qmk#14740)
  Enabled Bootmagic Lite (qmk#14573)
  Remove SERIAL_LINK feature (qmk#14727)
  Reuse of EEPROM debounce logic (qmk#14699)
  Fix i2c_readReg16 (qmk#14730)
  Purge uGFX. (qmk#14720)
  i2c_master: Add support for reading/writing to 16-bit registers (qmk#14289)
  Updated Keychron Q1 user keymap (qmk#14666)
  Mode M65S touch-up (qmk#14722)
  Remove sysex API (qmk#14723)
  MelGeek Mach80: correct Configurator layout (qmk#14716)
  Added semicolons to rules.mk to allow symlinks from /bin/sh to /bin/zsh to complete the filesize check without error. (qmk#14718)
  Move Audio drivers from quantum to platform drivers folder (qmk#14308)
  [Bug] Fix command feature if mousekey is enabled and using 3-speed setting (qmk#14697)
  [Keyboard] Add basic Keyhive Sofle support (qmk#14296)
  [Keymap] Some updates to mechmerlin userspace and keymaps (qmk#14711)
  0xc7/61key touch-up (qmk#14712)
  Durgod DGK6X Galaxy: correct Configurator layout (qmk#14714)
  More PR checklist updates (qmk#14705)
  Add clarification for licensing. (qmk#14704)
  ...
ptrxyz pushed a commit to ptrxyz/qmk_firmware that referenced this pull request Apr 9, 2022
* reuse rgb debounce logic

* Refactor led matrix

* Remove log line

* timeout should not be hard coded
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* reuse rgb debounce logic

* Refactor led matrix

* Remove log line

* timeout should not be hard coded
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.

3 participants