From ff41c22fdccd30cdba44ba840d68261f74f45135 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Thu, 25 Mar 2021 06:33:18 -0500 Subject: Adding keyboard level weak function for slave matrix scan (#12317) --- quantum/matrix.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'quantum/matrix.h') diff --git a/quantum/matrix.h b/quantum/matrix.h index ce57010a47..3fe691aaee 100644 --- a/quantum/matrix.h +++ b/quantum/matrix.h @@ -74,6 +74,11 @@ void matrix_scan_kb(void); void matrix_init_user(void); void matrix_scan_user(void); +#ifdef SPLIT_KEYBOARD +void matrix_slave_scan_kb(void); +void matrix_slave_scan_user(void); +#endif + #ifdef __cplusplus } #endif -- cgit v1.2.3 From ac2e6e01f155811d0e206298f0d7cadcc9234603 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue, 13 Jul 2021 16:50:25 +0900 Subject: Change the prototype of matrix_output_unselect_delay() (#13045) The prototype of matrix_output_unselect_delay() has been changed as follows. ```c void matrix_output_unselect_delay(uint8_t line, bool key_pressed); ``` Currently, no keyboard seems to be redefining `matrix_output_unselect_delay()`, so there is no change in the system behavior. With this change, the keyboard level code can get some optimization hints, for example, the following. ```c 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 } } ``` --- quantum/matrix.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'quantum/matrix.h') diff --git a/quantum/matrix.h b/quantum/matrix.h index 3fe691aaee..5c696622fc 100644 --- a/quantum/matrix.h +++ b/quantum/matrix.h @@ -56,7 +56,7 @@ matrix_row_t matrix_get_row(uint8_t row); void matrix_print(void); /* delay between changing matrix pin state and reading values */ void matrix_output_select_delay(void); -void matrix_output_unselect_delay(void); +void matrix_output_unselect_delay(uint8_t line, bool key_pressed); /* only for backwards compatibility. delay between changing matrix pin state and reading values */ void matrix_io_delay(void); -- cgit v1.2.3