qmk-dactyl-manuform-a/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 Format code according to conventions (#12056) 2021-02-28 15:53:54 +00:00
debounce Avoid 8-bit timer overflows in debounce algorithms (#12240) 2021-06-09 17:23:21 +10:00
keymap_extras Merge remote-tracking branch 'origin/master' into develop 2021-01-13 04:53:32 +00:00
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 2020 November 28 Breaking Changes Update (#11053) 2020-11-28 12:02:18 -08:00
sequencer 2020 November 28 Breaking Changes Update (#11053) 2020-11-28 12:02:18 -08:00
serial_link Ensure single newline at EOF for core files (#11310) 2020-12-28 04:36:32 +11:00
split_common Use single memcmp to determine if matrix changed. (#13064) 2021-06-09 17:19:42 +10:00
template Recommend use of LED Indicator config (#10895) 2020-11-16 14:16:42 +11:00
tools Backlight abstraction and other changes (#439) 2016-06-23 22:18:20 -04:00
visualizer Change include guards in quantum/ to pragma once (#11239) 2020-12-26 15:53:12 +11:00
api.c clang-format changes 2019-08-30 15:01:52 -07:00
api.h Change include guards in quantum/ to pragma once (#11239) 2020-12-26 15:53:12 +11:00
bitwise.c Migrate some tmk_core files to quantum (#11791) 2021-02-07 23:16:15 +00:00
bitwise.h Migrate some tmk_core files to quantum (#11791) 2021-02-07 23:16:15 +00:00
color.c Add support for hsv->rgb conversion without using CIE curve. (#9856) 2020-08-29 14:30:02 -07:00
color.h Add BGR byte order for WS2812 drivers (#11562) 2021-01-16 08:42:30 +11:00
command.c Merge remote-tracking branch 'origin/master' into develop 2021-02-07 23:16:47 +00:00
command.h Migrate some tmk_core files to quantum (#11791) 2021-02-07 23:16:15 +00:00
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 format code according to conventions [skip ci] 2020-07-04 15:01:25 +00:00
dip_switch.h Add Dip Switch as a core feature (#6140) 2019-09-03 08:34:31 -07:00
dynamic_keymap.c Improve EEPROM defaults for Dynamic Keymaps (#12853) 2021-05-10 15:37:36 -07:00
dynamic_keymap.h clang-format changes 2019-08-30 15:01:52 -07:00
dynamic_macro.h [Core] Convert Dynamic Macro to a Core Feature (#5948) 2019-11-04 22:59:13 -08:00
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 Hid joystick interface (#4226) 2020-08-29 14:30:02 -07:00
joystick.h 2020 November 28 Breaking Changes Update (#11053) 2020-11-28 12:02:18 -08:00
keycode_config.c clang-format changes 2019-08-30 15:01:52 -07:00
keycode_config.h 2021 May 29 Breaking Changes Update (#13034) 2021-05-29 14:38:50 -07:00
keymap.h Change include guards in quantum/ to pragma once (#11239) 2020-12-26 15:53:12 +11:00
keymap_common.c Strip out features to allow minimum firmware sizes (#8645) 2020-04-01 21:06:22 +01:00
led.c Ensure single newline at EOF for core files (#11310) 2020-12-28 04:36:32 +11:00
led.h Migrate some tmk_core files to quantum (#11791) 2021-02-07 23:16:15 +00:00
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 Remove unused LED_BREATHING_TABLE 2020-03-06 22:29:01 -08:00
led_tables.h Change include guards in quantum/ to pragma once (#11239) 2020-12-26 15:53:12 +11:00
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 Remove legacy print backward compatiblitly (#11805) 2021-02-06 16:56:13 +00:00
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 Migrate mousekey to quantum (#11804) 2021-02-07 13:56:08 +00:00
pointing_device.c Manually run formatting job (#11797) 2021-02-05 13:27:24 +00:00
pointing_device.h Improve Pointing Device report sending (#11064) 2021-02-03 17:25:05 -08:00
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 Change include guards in quantum/ to pragma once (#11239) 2020-12-26 15:53:12 +11:00
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 CLI-ify rgblight_breathing_table_calc.c (#11174) 2020-12-16 14:24:42 +11:00
rgblight_list.h Add definitions for RGB off/black. (#11132) 2020-12-06 17:10:58 +11:00
rgblight_modes.h New RGB Lighting effect: Twinkle (#8887) 2020-05-09 01:56:16 -07:00
rgblight_post_config.h clang-format changes 2019-08-30 15:01:52 -07:00
ring_buffer.h Migrate some tmk_core files to quantum (#11791) 2021-02-07 23:16:15 +00:00
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 Migrate some tmk_core files to quantum (#11791) 2021-02-07 23:16:15 +00:00
variable_trace.c clang-format changes 2019-08-30 15:01:52 -07:00
variable_trace.h Change include guards in quantum/ to pragma once (#11239) 2020-12-26 15:53:12 +11:00
velocikey.c clang-format changes 2019-08-30 15:01:52 -07:00
velocikey.h Change include guards in quantum/ to pragma once (#11239) 2020-12-26 15:53:12 +11:00
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 Normalise include statements in core code (#11153) 2020-12-11 13:45:24 +11:00
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