summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/clueboard/60/matrix.c62
-rw-r--r--keyboards/ergodox_infinity/matrix.c4
-rw-r--r--keyboards/infinity60/matrix.c4
-rw-r--r--keyboards/jm60/matrix.c4
-rw-r--r--keyboards/k_type/matrix.c4
-rw-r--r--keyboards/whitefox/matrix.c5
6 files changed, 42 insertions, 41 deletions
diff --git a/keyboards/clueboard/60/matrix.c b/keyboards/clueboard/60/matrix.c
index 76a15ca7ef..4023bc03cf 100644
--- a/keyboards/clueboard/60/matrix.c
+++ b/keyboards/clueboard/60/matrix.c
@@ -11,7 +11,7 @@
/* Clueboard 60%
*
- * Column pins are input with internal pull-down.
+ * Column pins are input with internal pull-down.
* Row pins are output and strobe with high.
* Key is high or 1 when it turns on.
*
@@ -68,8 +68,8 @@ void matrix_init(void) {
palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLDOWN);
palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN);
- memset(matrix, 0, MATRIX_ROWS);
- memset(matrix_debouncing, 0, MATRIX_COLS);
+ memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
+ memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t));
/* Setup capslock */
// palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL);
@@ -84,20 +84,20 @@ uint8_t matrix_scan(void) {
// strobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 }
switch (col) {
- case 0: palSetPad(GPIOA, 2); break;
- case 1: palSetPad(GPIOA, 3); break;
- case 2: palSetPad(GPIOA, 6); break;
- case 3: palSetPad(GPIOB, 14); break;
- case 4: palSetPad(GPIOB, 15); break;
- case 5: palSetPad(GPIOA, 8); break;
- case 6: palSetPad(GPIOA, 9); break;
- case 7: palSetPad(GPIOA, 7); break;
- case 8: palSetPad(GPIOB, 3); break;
- case 9: palSetPad(GPIOB, 4); break;
- case 10: palSetPad(GPIOC, 15); break;
- case 11: palSetPad(GPIOC, 14); break;
- case 12: palSetPad(GPIOC, 13); break;
- case 13: palSetPad(GPIOB, 5); break;
+ case 0: palSetPad(GPIOA, 2); break;
+ case 1: palSetPad(GPIOA, 3); break;
+ case 2: palSetPad(GPIOA, 6); break;
+ case 3: palSetPad(GPIOB, 14); break;
+ case 4: palSetPad(GPIOB, 15); break;
+ case 5: palSetPad(GPIOA, 8); break;
+ case 6: palSetPad(GPIOA, 9); break;
+ case 7: palSetPad(GPIOA, 7); break;
+ case 8: palSetPad(GPIOB, 3); break;
+ case 9: palSetPad(GPIOB, 4); break;
+ case 10: palSetPad(GPIOC, 15); break;
+ case 11: palSetPad(GPIOC, 14); break;
+ case 12: palSetPad(GPIOC, 13); break;
+ case 13: palSetPad(GPIOB, 5); break;
case 14: palSetPad(GPIOB, 6); break;
}
@@ -115,20 +115,20 @@ uint8_t matrix_scan(void) {
// unstrobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC15, PC14, PC13, PB5, PB6 }
switch (col) {
- case 0: palClearPad(GPIOA, 2); break;
- case 1: palClearPad(GPIOA, 3); break;
- case 2: palClearPad(GPIOA, 6); break;
- case 3: palClearPad(GPIOB, 14); break;
- case 4: palClearPad(GPIOB, 15); break;
- case 5: palClearPad(GPIOA, 8); break;
- case 6: palClearPad(GPIOA, 9); break;
- case 7: palClearPad(GPIOA, 7); break;
- case 8: palClearPad(GPIOB, 3); break;
- case 9: palClearPad(GPIOB, 4); break;
- case 10: palClearPad(GPIOC, 15); break;
- case 11: palClearPad(GPIOC, 14); break;
- case 12: palClearPad(GPIOC, 13); break;
- case 13: palClearPad(GPIOB, 5); break;
+ case 0: palClearPad(GPIOA, 2); break;
+ case 1: palClearPad(GPIOA, 3); break;
+ case 2: palClearPad(GPIOA, 6); break;
+ case 3: palClearPad(GPIOB, 14); break;
+ case 4: palClearPad(GPIOB, 15); break;
+ case 5: palClearPad(GPIOA, 8); break;
+ case 6: palClearPad(GPIOA, 9); break;
+ case 7: palClearPad(GPIOA, 7); break;
+ case 8: palClearPad(GPIOB, 3); break;
+ case 9: palClearPad(GPIOB, 4); break;
+ case 10: palClearPad(GPIOC, 15); break;
+ case 11: palClearPad(GPIOC, 14); break;
+ case 12: palClearPad(GPIOC, 13); break;
+ case 13: palClearPad(GPIOB, 5); break;
case 14: palClearPad(GPIOB, 6); break;
}
diff --git a/keyboards/ergodox_infinity/matrix.c b/keyboards/ergodox_infinity/matrix.c
index 3364f8c905..3baa07f583 100644
--- a/keyboards/ergodox_infinity/matrix.c
+++ b/keyboards/ergodox_infinity/matrix.c
@@ -62,8 +62,8 @@ void matrix_init(void)
palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL);
- memset(matrix, 0, MATRIX_ROWS);
- memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS);
+ memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
+ memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS * sizeof(matrix_row_t));
matrix_init_quantum();
}
diff --git a/keyboards/infinity60/matrix.c b/keyboards/infinity60/matrix.c
index b6ccf86c3a..bf86591ccf 100644
--- a/keyboards/infinity60/matrix.c
+++ b/keyboards/infinity60/matrix.c
@@ -60,8 +60,8 @@ void matrix_init(void)
palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL);
#endif
- memset(matrix, 0, MATRIX_ROWS);
- memset(matrix_debouncing, 0, MATRIX_ROWS);
+ memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
+ memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t));
matrix_init_quantum();
}
diff --git a/keyboards/jm60/matrix.c b/keyboards/jm60/matrix.c
index 8430a5843b..01bb4a80d1 100644
--- a/keyboards/jm60/matrix.c
+++ b/keyboards/jm60/matrix.c
@@ -49,8 +49,8 @@ void matrix_init(void)
palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL);
- memset(matrix, 0, MATRIX_ROWS);
- memset(matrix_debouncing, 0, MATRIX_ROWS);
+ memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
+ memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t));
}
uint8_t matrix_scan(void)
diff --git a/keyboards/k_type/matrix.c b/keyboards/k_type/matrix.c
index 7f230bebbc..d919bb8809 100644
--- a/keyboards/k_type/matrix.c
+++ b/keyboards/k_type/matrix.c
@@ -42,8 +42,8 @@ void matrix_init(void)
palSetPadMode(GPIOD, 1, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOD, 4, PAL_MODE_OUTPUT_PUSHPULL);
- memset(matrix, 0, MATRIX_ROWS);
- memset(matrix_debouncing, 0, MATRIX_ROWS);
+ memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
+ memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t));
matrix_init_quantum();
}
diff --git a/keyboards/whitefox/matrix.c b/keyboards/whitefox/matrix.c
index ff334c03ae..c6f2c8d621 100644
--- a/keyboards/whitefox/matrix.c
+++ b/keyboards/whitefox/matrix.c
@@ -47,8 +47,9 @@ void matrix_init(void)
palSetPadMode(GPIOC, 10, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL);
- memset(matrix, 0, MATRIX_ROWS);
- memset(matrix_debouncing, 0, MATRIX_ROWS);
+ memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
+ memset(matrix_debouncing, 0, MATRIX_ROWS * sizeof(matrix_row_t));
+
matrix_init_quantum();
}