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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_common/matrix.c b/tests/test_common/matrix.c
index 5ab5bac6c9..0d9fa68b04 100644
--- a/tests/test_common/matrix.c
+++ b/tests/test_common/matrix.c
@@ -22,7 +22,7 @@
static matrix_row_t matrix[MATRIX_ROWS] = {};
void matrix_init(void) {
- memset(matrix, 0, sizeof(matrix));
+ clear_all_keys();
matrix_init_quantum();
}
@@ -54,3 +54,7 @@ void press_key(uint8_t col, uint8_t row) {
void release_key(uint8_t col, uint8_t row) {
matrix[row] &= ~(1 << col);
}
+
+void clear_all_keys(void) {
+ memset(matrix, 0, sizeof(matrix));
+}