qmk_sweep_skeletyl/quantum
Simon Arlott b829a1d264
Avoid 8-bit timer overflows in debounce algorithms (#12240)
* Add fast_timer_t that is 16-bit or 32-bit based on architecture

A 16-bit timer will overflow sooner but be faster to compare on AVR.

* Avoid 8-bit timer overflows in debounce algorithms

Count down remaining elapsed time instead of trying to do 8-bit timer
comparisons.

Add a "none" implementation that is automatically used if DEBOUNCE is
0 otherwise it will break the _pk/_pr count down.

* Avoid unnecessary polling of the entire matrix in sym_eager_pk

The matrix only needs to be updated when a debounce timer expires.

* Avoid unnecessary polling of the entire matrix in sym_eager_pr

The matrix only needs to be updated when a debounce timer expires.

The use of the "needed_update" variable is trying to do what
"matrix_need_update" was added to fix but didn't work because it only
applied when all keys finished debouncing.

* Fix sym_defer_g timing inconsistency compared to other debounce algorithms

DEBOUNCE=5 should process the key after 5ms, not 6ms

* Add debounce tests
2021-06-09 17:23:21 +10:00
..
api
audio Keyboard: Planck THK (#12597) 2021-05-26 20:49:30 +02:00
backlight 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
bootmagic 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
debounce Avoid 8-bit timer overflows in debounce algorithms (#12240) 2021-06-09 17:23:21 +10:00
keymap_extras
led_matrix_animations 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
led_matrix_runners 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
process_keycode 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
rgb_matrix_animations
rgb_matrix_runners
sequencer
serial_link
split_common Use single memcmp to determine if matrix changed. (#13064) 2021-06-09 17:19:42 +10:00
template
tools
visualizer
api.c
api.h
bitwise.c
bitwise.h
color.c
color.h
command.c
command.h
config_common.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
debounce.h Avoid 8-bit timer overflows in debounce algorithms (#12240) 2021-06-09 17:23:21 +10:00
dip_switch.c
dip_switch.h
dynamic_keymap.c
dynamic_keymap.h
dynamic_macro.h
encoder.c 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
encoder.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
joystick.c
joystick.h
keycode_config.c
keycode_config.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
keymap.h
keymap_common.c
led.c
led.h
led_matrix.c Fix Bug with (RGB|LED)_DISABLE_WHEN_USB_SUSPENDED define (#13060) 2021-06-09 05:06:55 +10:00
led_matrix.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
led_matrix_drivers.c 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
led_matrix_types.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
led_tables.c
led_tables.h
matrix.c Use single memcmp to determine if matrix changed. (#13064) 2021-06-09 17:19:42 +10:00
matrix.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
matrix_common.c
mcu_selection.mk 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
mousekey.c
mousekey.h
pointing_device.c
pointing_device.h
quantum.c 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
quantum.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
quantum_keycodes.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
rgb.h
rgb_matrix.c Fix Bug with (RGB|LED)_DISABLE_WHEN_USB_SUSPENDED define (#13060) 2021-06-09 05:06:55 +10:00
rgb_matrix.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
rgb_matrix_drivers.c 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
rgb_matrix_types.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
rgblight.c 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
rgblight.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
rgblight_breathe_table.h
rgblight_list.h
rgblight_modes.h
rgblight_post_config.h
ring_buffer.h
send_string.c
send_string.h
send_string_keycodes.h
util.h
variable_trace.c
variable_trace.h
velocikey.c
velocikey.h
via.c
via.h
via_ensure_keycode.h
wpm.c 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
wpm.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00