diff options
author | QMK Bot <hello@qmk.fm> | 2022-05-18 17:33:52 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2022-05-18 17:33:52 +0000 |
commit | 3904a6afbe41e35c231dc449e3e2fa839d7b35a9 (patch) | |
tree | e8df23b2fd6eb582c0f71e077b349d32557487cc /users/mtei/matrix_output_unselect_delay_ondemand.c | |
parent | 6503987c84994b2c6b5229db8b91c14d8bd11e41 (diff) | |
parent | 33d568e29b454e5ead83b9e7216bd807549cc9b6 (diff) |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'users/mtei/matrix_output_unselect_delay_ondemand.c')
-rw-r--r-- | users/mtei/matrix_output_unselect_delay_ondemand.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/users/mtei/matrix_output_unselect_delay_ondemand.c b/users/mtei/matrix_output_unselect_delay_ondemand.c new file mode 100644 index 0000000000..362d8a1303 --- /dev/null +++ b/users/mtei/matrix_output_unselect_delay_ondemand.c @@ -0,0 +1,18 @@ +// Copyright (c) 2021 Takeshi Ishii (mtei@github) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +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 + wait_us(MATRIX_IO_DELAY); +# endif +# else + wait_us(30); +# endif + } +} |