diff options
Diffstat (limited to 'keyboards/xd84/custom_matrix_helper.c')
-rw-r--r-- | keyboards/xd84/custom_matrix_helper.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/keyboards/xd84/custom_matrix_helper.c b/keyboards/xd84/custom_matrix_helper.c deleted file mode 100644 index e4e256381..000000000 --- a/keyboards/xd84/custom_matrix_helper.c +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | /* Copyright 2019 | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include <stdint.h> | ||
17 | #include <stdbool.h> | ||
18 | #include "wait.h" | ||
19 | #include "print.h" | ||
20 | #include "debug.h" | ||
21 | #include "util.h" | ||
22 | #include "matrix.h" | ||
23 | #include "debounce.h" | ||
24 | #include "quantum.h" | ||
25 | |||
26 | //_____COULD BE COMMON_________________________________________________________ | ||
27 | /* matrix state(1:on, 0:off) */ | ||
28 | /*static*/ matrix_row_t raw_matrix[MATRIX_ROWS]; | ||
29 | /*static*/ matrix_row_t matrix[MATRIX_ROWS]; | ||
30 | |||
31 | __attribute__ ((weak)) | ||
32 | matrix_row_t matrix_get_row(uint8_t row) { | ||
33 | return matrix[row]; | ||
34 | } | ||
35 | |||
36 | //_____CUSTOM MATRIX 'LITE'____________________________________________________ | ||
37 | __attribute__ ((weak)) | ||
38 | void custom_matrix_init(void) { | ||
39 | } | ||
40 | |||
41 | __attribute__ ((weak)) | ||
42 | bool custom_matrix_scan(matrix_row_t current_matrix[]) { | ||
43 | bool changed = true; | ||
44 | return changed; | ||
45 | } | ||
46 | |||
47 | __attribute__ ((weak)) | ||
48 | void matrix_init(void) { | ||
49 | |||
50 | custom_matrix_init(); | ||
51 | |||
52 | // initialize matrix state: all keys off | ||
53 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { | ||
54 | raw_matrix[i] = 0; | ||
55 | matrix[i] = 0; | ||
56 | } | ||
57 | |||
58 | debounce_init(MATRIX_ROWS); | ||
59 | |||
60 | matrix_init_quantum(); | ||
61 | } | ||
62 | |||
63 | __attribute__ ((weak)) | ||
64 | uint8_t matrix_scan(void) { | ||
65 | bool changed = custom_matrix_scan(raw_matrix); | ||
66 | |||
67 | debounce(raw_matrix, matrix, MATRIX_ROWS, changed); | ||
68 | |||
69 | matrix_scan_quantum(); | ||
70 | return 1; | ||
71 | } | ||