summaryrefslogtreecommitdiff
path: root/keyboards/clueboard
diff options
context:
space:
mode:
authorKaleb Elwert <belak@coded.io>2018-01-10 13:15:06 -0800
committerJack Humbert <jack.humb@gmail.com>2018-01-12 13:23:38 -0500
commit3be81a2dafe13a9c2a591528db1b3973de923167 (patch)
treef39faeef36005e1152ad1f7a652d1565dfda1b1b /keyboards/clueboard
parent586a5e8d1da98c98cc3f14639ad820c2cd417860 (diff)
Fix call to memset for various keyboards
Diffstat (limited to 'keyboards/clueboard')
-rw-r--r--keyboards/clueboard/60/matrix.c62
1 files changed, 31 insertions, 31 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;
}