diff options
author | Stefan Kerkmann <karlk90@pm.me> | 2022-12-14 16:31:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-15 02:31:08 +1100 |
commit | 962e4c0e1854b10612bab547c3d842c5f967dd23 (patch) | |
tree | dfe13a5a7d3f593452a1e77b5c4173263d3fb2e2 /tests/test_common/matrix.c | |
parent | e2ab98f9601049a7540bd89cb128669b09c688d5 (diff) |
[Test] Reset timer for every unit test and provide timestamps for log messages (#17028)
Diffstat (limited to 'tests/test_common/matrix.c')
-rw-r--r-- | tests/test_common/matrix.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_common/matrix.c b/tests/test_common/matrix.c index 7b24d560e3..45e76d32c5 100644 --- a/tests/test_common/matrix.c +++ b/tests/test_common/matrix.c @@ -41,11 +41,15 @@ void matrix_init_kb(void) {} void matrix_scan_kb(void) {} void press_key(uint8_t col, uint8_t row) { - matrix[row] |= 1 << col; + matrix[row] |= (matrix_row_t)1 << col; } void release_key(uint8_t col, uint8_t row) { - matrix[row] &= ~(1 << col); + matrix[row] &= ~((matrix_row_t)1 << col); +} + +bool matrix_is_on(uint8_t row, uint8_t col) { + return (matrix[row] & ((matrix_row_t)1 << col)); } void clear_all_keys(void) { |