summaryrefslogtreecommitdiffstats
path: root/tests/test_common/matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_common/matrix.c')
-rw-r--r--tests/test_common/matrix.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/test_common/matrix.c b/tests/test_common/matrix.c
index 7b24d560e3..1d99402713 100644
--- a/tests/test_common/matrix.c
+++ b/tests/test_common/matrix.c
@@ -22,11 +22,11 @@ static matrix_row_t matrix[MATRIX_ROWS] = {};
void matrix_init(void) {
clear_all_keys();
- matrix_init_quantum();
+ matrix_init_kb();
}
uint8_t matrix_scan(void) {
- matrix_scan_quantum();
+ matrix_scan_kb();
return 1;
}
@@ -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) {