qmk/quantum
フィルターペーパー 4bd5c033c3
Refactor debounce algorithm with static allocation (#25515)
* Refactor debounce counters with direct indexing

* Refactor code to use array indexing for debounce_counters
* Use global MATRIX_ROW_SHIFTER macro

* Refactor debounce algorithm with static allocation

* Converted arrays to static allocation
* Standardised use of MATRIX_ROWS_PER_HAND for array sizing
* Added Doxygen comments for primary debounce functions
* Removed debounce_free()

* Rewrite sym_defer_pr

* Modernise code using sym_defer_pk as template
* Format consistency with other current algorithms

* Use shorter SPDX-License-Identifier

* Remove ChibiOS core memory manager guard
* Keep type definition within DEBOUNCE guard

* Add change log

* Minor optimisation refactor

* Pre-calculate row_offset in per-key matrix loops
* Add inline compiler hints
* Improve readability with blank lines

* Limit elapsed time to the maximum debounce value

* Apply suggestions from code review

Declare counters with "DEBOUNCE_ELAPSED"

Co-authored-by: Joel Challis <git@zvecr.com>

* Update change log to new breaking change date

---------

Co-authored-by: Joel Challis <git@zvecr.com>
2025-09-07 13:34:05 +01:00
..
audio
backlight
battery
bootmagic
connection
debounce
encoder/tests
keymap_extras
led_matrix
logging
midi
nvm
os_detection/tests
painter
pointing_device
process_keycode
rgb_matrix
rgblight
send_string
sequencer
split_common
unicode
wear_leveling
action.c
action.h
action_code.h
action_layer.c
action_layer.h
action_tapping.c
action_tapping.h
action_util.c
action_util.h
basic_profiling.h
bits.h
bitwise.c
bitwise.h
caps_word.c
caps_word.h
color.c
color.h
command.c
command.h
compiler_support.h
crc.c
crc.h
debounce.h
deferred_exec.c
deferred_exec.h
digitizer.c
digitizer.h
dip_switch.c
dip_switch.h
dynamic_keymap.c
dynamic_keymap.h
eeconfig.c
eeconfig.h
encoder.c
encoder.h
haptic.c
haptic.h
joystick.c
joystick.h
keyboard.c
keyboard.h
keycode.h
keycode_config.c
keycode_config.h
keycode_string.c
keycode_string.h
keycodes.h
keymap_common.c
keymap_common.h
keymap_introspection.c
keymap_introspection.h
layer_lock.c
layer_lock.h
leader.c
leader.h
led.c
led.h
led_tables.c
led_tables.h
main.c
matrix.c
matrix.h
matrix_common.c
modifiers.h
mousekey.c
mousekey.h
os_detection.c
os_detection.h
pointing_device_internal.h
programmable_button.c
programmable_button.h
quantum.c
quantum.h
quantum_keycodes.h
quantum_keycodes_legacy.h
raw_hid.c
raw_hid.h
repeat_key.c
repeat_key.h
ring_buffer.h
secure.c
secure.h
steno_keycodes.h
sync_timer.c
sync_timer.h
tri_layer.c
tri_layer.h
util.h
variable_trace.c
variable_trace.h
via.c
via.h
virtser.h
wpm.c
wpm.h