diff options
| author | Stefan Kerkmann <karlk90@pm.me> | 2023-04-03 10:33:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-03 18:33:45 +1000 |
| commit | fcf8b804ed95a98561bd4c1d6c85604be0f7cc7b (patch) | |
| tree | 6b6917d99ced027d614e7b461e1cd1939833a9cd /keyboards/nullbitsco | |
| parent | 2d9140af53e4e5bbc5cd50a2b6f3eda20ed8f71e (diff) | |
[Core] Refactor `keyevent_t` for 1ms timing resolution (#15847)
Diffstat (limited to 'keyboards/nullbitsco')
| -rw-r--r-- | keyboards/nullbitsco/tidbit/tidbit.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/keyboards/nullbitsco/tidbit/tidbit.c b/keyboards/nullbitsco/tidbit/tidbit.c index 356c580342..d07ba12651 100644 --- a/keyboards/nullbitsco/tidbit/tidbit.c +++ b/keyboards/nullbitsco/tidbit/tidbit.c | |||
| @@ -85,15 +85,11 @@ bool oled_task_kb(void) { | |||
| 85 | #endif | 85 | #endif |
| 86 | 86 | ||
| 87 | static void process_encoder_matrix(encodermap_t pos) { | 87 | static void process_encoder_matrix(encodermap_t pos) { |
| 88 | action_exec((keyevent_t){ | 88 | action_exec(MAKE_KEYEVENT(pos.r, pos.c, true)); |
| 89 | .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = true, .time = (timer_read() | 1) /* time should not be 0 */ | ||
| 90 | }); | ||
| 91 | #if TAP_CODE_DELAY > 0 | 89 | #if TAP_CODE_DELAY > 0 |
| 92 | wait_ms(TAP_CODE_DELAY); | 90 | wait_ms(TAP_CODE_DELAY); |
| 93 | #endif | 91 | #endif |
| 94 | action_exec((keyevent_t){ | 92 | action_exec(MAKE_KEYEVENT(pos.r, pos.c, false)); |
| 95 | .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = false, .time = (timer_read() | 1) /* time should not be 0 */ | ||
| 96 | }); | ||
| 97 | } | 93 | } |
| 98 | 94 | ||
| 99 | bool encoder_update_kb(uint8_t index, bool clockwise) { | 95 | bool encoder_update_kb(uint8_t index, bool clockwise) { |
