aboutsummaryrefslogtreecommitdiffstats
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.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/test_common/matrix.c b/tests/test_common/matrix.c
index 940f28f35..85556e2c4 100644
--- a/tests/test_common/matrix.c
+++ b/tests/test_common/matrix.c
@@ -16,6 +16,9 @@
#include "matrix.h"
+#include "test_matrix.h"
+
+static matrix_row_t matrix[MATRIX_ROWS] = {};
void matrix_init(void) {
matrix_init_quantum();
@@ -27,7 +30,7 @@ uint8_t matrix_scan(void) {
}
matrix_row_t matrix_get_row(uint8_t row) {
- return 0;
+ return matrix[row];
}
void matrix_print(void) {
@@ -41,3 +44,11 @@ void matrix_init_kb(void) {
void matrix_scan_kb(void) {
}
+
+void press_key(uint8_t col, uint8_t row) {
+ matrix[row] |= 1 << col;
+}
+
+void release_key(uint8_t col, uint8_t row) {
+ matrix[row] &= ~(1 << col);
+}