forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove the workaround in users/mtei/matrix_output_delay.c
Since qmk's standard wait_us() is now accurate due to the changes in qmk#17607, the workaround is no longer necessary.
- Loading branch information
Showing
2 changed files
with
15 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
// Copyright (c) 2021 Takeshi Ishii (mtei@github) | ||
// Copyright (c) 2022 Takeshi Ishii (mtei@github) | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
#include QMK_KEYBOARD_H | ||
|
||
#ifndef MATRIX_IO_DELAY | ||
# define MATRIX_IO_DELAY 30 | ||
#endif | ||
|
||
void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { | ||
/* If none of the keys are pressed, | ||
* there is no need to wait for time for the next line. */ | ||
if (key_pressed) { | ||
# ifdef MATRIX_IO_DELAY | ||
# if MATRIX_IO_DELAY > 0 | ||
if (!key_pressed) { | ||
/* If none of the keys are pressed, | ||
* there is no need to wait for time for the next line. */ | ||
return; | ||
} | ||
/* In platforms/chibios/_wait.h, the implementation for PROTOCOL_CHIBIOS | ||
* calls 'chThdSleepMicroseconds(1)' when 'wait_us(0)'. | ||
* However, 'wait_us(0)' should do nothing. */ | ||
if (MATRIX_IO_DELAY > 0) { | ||
wait_us(MATRIX_IO_DELAY); | ||
# endif | ||
# else | ||
wait_us(30); | ||
# endif | ||
} | ||
} |