diff options
| author | Joel Challis <git@zvecr.com> | 2020-02-21 03:49:33 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-21 14:49:33 +1100 |
| commit | 7707724dc4864cb4ede738ee9e2c3568df99ced2 (patch) | |
| tree | a8107c5eaf6254ce71ae1e3c4b61d69b6c4ef7d4 /quantum/matrix_common.c | |
| parent | 42d6270f28831e95d1cb9c14a7423d5b1d864d67 (diff) | |
| download | qmk_firmware-7707724dc4864cb4ede738ee9e2c3568df99ced2.tar.gz qmk_firmware-7707724dc4864cb4ede738ee9e2c3568df99ced2.zip | |
Allow 30us matrix delay to be keyboard/user overridable (#8216)
* Allow 30us matrix delay to be configurable via define
* Move wait logic to matrix_common
* Move wait logic to matrix_common - fix wait includes
Diffstat (limited to 'quantum/matrix_common.c')
| -rw-r--r-- | quantum/matrix_common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/quantum/matrix_common.c b/quantum/matrix_common.c index c326e59ca..de62b8070 100644 --- a/quantum/matrix_common.c +++ b/quantum/matrix_common.c | |||
| @@ -1,8 +1,13 @@ | |||
| 1 | #include "matrix.h" | 1 | #include "matrix.h" |
| 2 | #include "debounce.h" | 2 | #include "debounce.h" |
| 3 | #include "wait.h" | ||
| 3 | #include "print.h" | 4 | #include "print.h" |
| 4 | #include "debug.h" | 5 | #include "debug.h" |
| 5 | 6 | ||
| 7 | #ifndef MATRIX_IO_DELAY | ||
| 8 | # define MATRIX_IO_DELAY 30 | ||
| 9 | #endif | ||
| 10 | |||
| 6 | /* matrix state(1:on, 0:off) */ | 11 | /* matrix state(1:on, 0:off) */ |
| 7 | matrix_row_t raw_matrix[MATRIX_ROWS]; | 12 | matrix_row_t raw_matrix[MATRIX_ROWS]; |
| 8 | matrix_row_t matrix[MATRIX_ROWS]; | 13 | matrix_row_t matrix[MATRIX_ROWS]; |
| @@ -78,6 +83,8 @@ uint8_t matrix_key_count(void) { | |||
| 78 | return count; | 83 | return count; |
| 79 | } | 84 | } |
| 80 | 85 | ||
| 86 | __attribute__((weak)) void matrix_io_delay(void) { wait_us(MATRIX_IO_DELAY); } | ||
| 87 | |||
| 81 | // CUSTOM MATRIX 'LITE' | 88 | // CUSTOM MATRIX 'LITE' |
| 82 | __attribute__((weak)) void matrix_init_custom(void) {} | 89 | __attribute__((weak)) void matrix_init_custom(void) {} |
| 83 | 90 | ||
