qmk_firmware/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 Move `API_SYSEX_MAX_SIZE` out of `config_common.h` (#12302) 2021-03-25 22:30:42 +11:00
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 fix line endings 2021-04-03 08:27:46 -07:00
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 Improve EEPROM defaults for Dynamic Keymaps (#12853) 2021-05-10 15:37:36 -07:00
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 Fix Kinetic speed condition (#12139) 2021-03-25 23:11:16 +11:00
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 Remove hex_to_keycode and move tap_random_base64 to send_string.c (#12079) 2021-03-12 18:03:44 +11:00
send_string.h Remove hex_to_keycode and move tap_random_base64 to send_string.c (#12079) 2021-03-12 18:03:44 +11:00
send_string_keycodes.h Workaround for recent changes to mouse keycodes (#12367) 2021-03-24 19:38:35 +00:00
util.h
variable_trace.c
variable_trace.h
velocikey.c
velocikey.h
via.c Fix keycode mappings for via and ensure they don't change within protocol (#12130) 2021-03-15 12:19:01 +11:00
via.h
via_ensure_keycode.h Fix keycode mappings for via and ensure they don't change within protocol (#12130) 2021-03-15 12:19:01 +11:00
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