aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/chimera_ergo/matrix.c4
-rw-r--r--keyboards/chimera_ls/matrix.c4
-rw-r--r--keyboards/chimera_ortho/matrix.c4
-rw-r--r--keyboards/comet46/matrix.c4
-rw-r--r--keyboards/dc01/arrow/matrix.c2
-rw-r--r--keyboards/dc01/left/matrix.c8
-rw-r--r--keyboards/dc01/numpad/matrix.c2
-rw-r--r--keyboards/dc01/right/matrix.c2
-rwxr-xr-xkeyboards/dichotomy/matrix.c2
-rw-r--r--keyboards/handwired/promethium/matrix.c2
-rw-r--r--keyboards/kmac/matrix.c2
-rwxr-xr-xkeyboards/kmini/matrix.c2
-rw-r--r--keyboards/mitosis/matrix.c4
-rw-r--r--keyboards/redox_w/matrix.c8
-rw-r--r--keyboards/sx60/matrix.c8
-rw-r--r--keyboards/telophase/matrix.c4
-rw-r--r--quantum/matrix.c2
17 files changed, 32 insertions, 32 deletions
diff --git a/keyboards/chimera_ergo/matrix.c b/keyboards/chimera_ergo/matrix.c
index 21d46ef9b..d512a51d9 100644
--- a/keyboards/chimera_ergo/matrix.c
+++ b/keyboards/chimera_ergo/matrix.c
@@ -112,7 +112,7 @@ uint8_t matrix_scan(void)
112 if (timeout > 10000){ 112 if (timeout > 10000){
113 break; 113 break;
114 } 114 }
115 } 115 }
116 uart_data[i] = SERIAL_UART_DATA; 116 uart_data[i] = SERIAL_UART_DATA;
117 } 117 }
118 118
@@ -134,7 +134,7 @@ uint8_t matrix_scan(void)
134inline 134inline
135bool matrix_is_on(uint8_t row, uint8_t col) 135bool matrix_is_on(uint8_t row, uint8_t col)
136{ 136{
137 return (matrix[row] & ((matrix_row_t)1<col)); 137 return (matrix[row] & ((matrix_row_t)1<<col));
138} 138}
139 139
140inline 140inline
diff --git a/keyboards/chimera_ls/matrix.c b/keyboards/chimera_ls/matrix.c
index 665d0d357..72fe44137 100644
--- a/keyboards/chimera_ls/matrix.c
+++ b/keyboards/chimera_ls/matrix.c
@@ -116,7 +116,7 @@ uint8_t matrix_scan(void)
116 if (timeout > 10000){ 116 if (timeout > 10000){
117 break; 117 break;
118 } 118 }
119 } 119 }
120 uart_data[i] = SERIAL_UART_DATA; 120 uart_data[i] = SERIAL_UART_DATA;
121 } 121 }
122 122
@@ -138,7 +138,7 @@ uint8_t matrix_scan(void)
138inline 138inline
139bool matrix_is_on(uint8_t row, uint8_t col) 139bool matrix_is_on(uint8_t row, uint8_t col)
140{ 140{
141 return (matrix[row] & ((matrix_row_t)1<col)); 141 return (matrix[row] & ((matrix_row_t)1<<col));
142} 142}
143 143
144inline 144inline
diff --git a/keyboards/chimera_ortho/matrix.c b/keyboards/chimera_ortho/matrix.c
index 66d29f8b3..dc38ba74f 100644
--- a/keyboards/chimera_ortho/matrix.c
+++ b/keyboards/chimera_ortho/matrix.c
@@ -102,7 +102,7 @@ uint8_t matrix_scan(void)
102 if (timeout > 10000){ 102 if (timeout > 10000){
103 break; 103 break;
104 } 104 }
105 } 105 }
106 uart_data[i] = SERIAL_UART_DATA; 106 uart_data[i] = SERIAL_UART_DATA;
107 } 107 }
108 108
@@ -124,7 +124,7 @@ uint8_t matrix_scan(void)
124inline 124inline
125bool matrix_is_on(uint8_t row, uint8_t col) 125bool matrix_is_on(uint8_t row, uint8_t col)
126{ 126{
127 return (matrix[row] & ((matrix_row_t)1<col)); 127 return (matrix[row] & ((matrix_row_t)1<<col));
128} 128}
129 129
130inline 130inline
diff --git a/keyboards/comet46/matrix.c b/keyboards/comet46/matrix.c
index 66d29f8b3..dc38ba74f 100644
--- a/keyboards/comet46/matrix.c
+++ b/keyboards/comet46/matrix.c
@@ -102,7 +102,7 @@ uint8_t matrix_scan(void)
102 if (timeout > 10000){ 102 if (timeout > 10000){
103 break; 103 break;
104 } 104 }
105 } 105 }
106 uart_data[i] = SERIAL_UART_DATA; 106 uart_data[i] = SERIAL_UART_DATA;
107 } 107 }
108 108
@@ -124,7 +124,7 @@ uint8_t matrix_scan(void)
124inline 124inline
125bool matrix_is_on(uint8_t row, uint8_t col) 125bool matrix_is_on(uint8_t row, uint8_t col)
126{ 126{
127 return (matrix[row] & ((matrix_row_t)1<col)); 127 return (matrix[row] & ((matrix_row_t)1<<col));
128} 128}
129 129
130inline 130inline
diff --git a/keyboards/dc01/arrow/matrix.c b/keyboards/dc01/arrow/matrix.c
index 85591f602..dd5e2ee9c 100644
--- a/keyboards/dc01/arrow/matrix.c
+++ b/keyboards/dc01/arrow/matrix.c
@@ -218,7 +218,7 @@ bool matrix_is_modified(void)
218inline 218inline
219bool matrix_is_on(uint8_t row, uint8_t col) 219bool matrix_is_on(uint8_t row, uint8_t col)
220{ 220{
221 return (matrix[row] & ((matrix_row_t)1<col)); 221 return (matrix[row] & ((matrix_row_t)1<<col));
222} 222}
223 223
224inline 224inline
diff --git a/keyboards/dc01/left/matrix.c b/keyboards/dc01/left/matrix.c
index 806583580..cbe3b3f3d 100644
--- a/keyboards/dc01/left/matrix.c
+++ b/keyboards/dc01/left/matrix.c
@@ -158,7 +158,7 @@ void matrix_init(void) {
158 matrix[i] = 0; 158 matrix[i] = 0;
159 matrix_debouncing[i] = 0; 159 matrix_debouncing[i] = 0;
160 } 160 }
161 161
162 matrix_init_quantum(); 162 matrix_init_quantum();
163} 163}
164 164
@@ -209,7 +209,7 @@ uint8_t matrix_scan(void)
209 debouncing = false; 209 debouncing = false;
210 } 210 }
211# endif 211# endif
212 212
213 if (i2c_transaction(SLAVE_I2C_ADDRESS_RIGHT, 0x3F, 0)){ //error has occured for main right half 213 if (i2c_transaction(SLAVE_I2C_ADDRESS_RIGHT, 0x3F, 0)){ //error has occured for main right half
214 error_count_right++; 214 error_count_right++;
215 if (error_count_right > ERROR_DISCONNECT_COUNT){ //disconnect half 215 if (error_count_right > ERROR_DISCONNECT_COUNT){ //disconnect half
@@ -220,7 +220,7 @@ uint8_t matrix_scan(void)
220 }else{ //no error 220 }else{ //no error
221 error_count_right = 0; 221 error_count_right = 0;
222 } 222 }
223 223
224 if (i2c_transaction(SLAVE_I2C_ADDRESS_ARROW, 0X3FFF, 8)){ //error has occured for arrow cluster 224 if (i2c_transaction(SLAVE_I2C_ADDRESS_ARROW, 0X3FFF, 8)){ //error has occured for arrow cluster
225 error_count_arrow++; 225 error_count_arrow++;
226 if (error_count_arrow > ERROR_DISCONNECT_COUNT){ //disconnect arrow cluster 226 if (error_count_arrow > ERROR_DISCONNECT_COUNT){ //disconnect arrow cluster
@@ -258,7 +258,7 @@ bool matrix_is_modified(void)
258inline 258inline
259bool matrix_is_on(uint8_t row, uint8_t col) 259bool matrix_is_on(uint8_t row, uint8_t col)
260{ 260{
261 return (matrix[row] & ((matrix_row_t)1<col)); 261 return (matrix[row] & ((matrix_row_t)1<<col));
262} 262}
263 263
264inline 264inline
diff --git a/keyboards/dc01/numpad/matrix.c b/keyboards/dc01/numpad/matrix.c
index 39637241d..5a13f3ff2 100644
--- a/keyboards/dc01/numpad/matrix.c
+++ b/keyboards/dc01/numpad/matrix.c
@@ -218,7 +218,7 @@ bool matrix_is_modified(void)
218inline 218inline
219bool matrix_is_on(uint8_t row, uint8_t col) 219bool matrix_is_on(uint8_t row, uint8_t col)
220{ 220{
221 return (matrix[row] & ((matrix_row_t)1<col)); 221 return (matrix[row] & ((matrix_row_t)1<<col));
222} 222}
223 223
224inline 224inline
diff --git a/keyboards/dc01/right/matrix.c b/keyboards/dc01/right/matrix.c
index 50fe19b8d..6d981797c 100644
--- a/keyboards/dc01/right/matrix.c
+++ b/keyboards/dc01/right/matrix.c
@@ -218,7 +218,7 @@ bool matrix_is_modified(void)
218inline 218inline
219bool matrix_is_on(uint8_t row, uint8_t col) 219bool matrix_is_on(uint8_t row, uint8_t col)
220{ 220{
221 return (matrix[row] & ((matrix_row_t)1<col)); 221 return (matrix[row] & ((matrix_row_t)1<<col));
222} 222}
223 223
224inline 224inline
diff --git a/keyboards/dichotomy/matrix.c b/keyboards/dichotomy/matrix.c
index 14c3f0d8e..f14c90128 100755
--- a/keyboards/dichotomy/matrix.c
+++ b/keyboards/dichotomy/matrix.c
@@ -198,7 +198,7 @@ uint8_t matrix_scan(void)
198inline 198inline
199bool matrix_is_on(uint8_t row, uint8_t col) 199bool matrix_is_on(uint8_t row, uint8_t col)
200{ 200{
201 return (matrix[row] & ((matrix_row_t)1<col)); 201 return (matrix[row] & ((matrix_row_t)1<<col));
202} 202}
203 203
204inline 204inline
diff --git a/keyboards/handwired/promethium/matrix.c b/keyboards/handwired/promethium/matrix.c
index 00f2b8e9d..0b4456e28 100644
--- a/keyboards/handwired/promethium/matrix.c
+++ b/keyboards/handwired/promethium/matrix.c
@@ -167,7 +167,7 @@ inline
167bool matrix_is_on(uint8_t row, uint8_t col) 167bool matrix_is_on(uint8_t row, uint8_t col)
168 168
169{ 169{
170 return (matrix[row] & ((matrix_row_t)1<col)); 170 return (matrix[row] & ((matrix_row_t)1<<col));
171} 171}
172 172
173inline 173inline
diff --git a/keyboards/kmac/matrix.c b/keyboards/kmac/matrix.c
index cfafa90e6..82f0621f2 100644
--- a/keyboards/kmac/matrix.c
+++ b/keyboards/kmac/matrix.c
@@ -97,7 +97,7 @@ uint8_t matrix_scan(void)
97inline 97inline
98bool matrix_is_on(uint8_t row, uint8_t col) 98bool matrix_is_on(uint8_t row, uint8_t col)
99{ 99{
100 return (matrix[row] & ((matrix_row_t)1<col)); 100 return (matrix[row] & ((matrix_row_t)1<<col));
101} 101}
102 102
103inline 103inline
diff --git a/keyboards/kmini/matrix.c b/keyboards/kmini/matrix.c
index 5f9bfe3d7..69135909a 100755
--- a/keyboards/kmini/matrix.c
+++ b/keyboards/kmini/matrix.c
@@ -112,7 +112,7 @@ uint8_t matrix_scan(void)
112inline 112inline
113bool matrix_is_on(uint8_t row, uint8_t col) 113bool matrix_is_on(uint8_t row, uint8_t col)
114{ 114{
115 return (matrix[row] & ((matrix_row_t)1<col)); 115 return (matrix[row] & ((matrix_row_t)1<<col));
116} 116}
117 117
118inline 118inline
diff --git a/keyboards/mitosis/matrix.c b/keyboards/mitosis/matrix.c
index 4b87242b9..e149b68bd 100644
--- a/keyboards/mitosis/matrix.c
+++ b/keyboards/mitosis/matrix.c
@@ -103,7 +103,7 @@ uint8_t matrix_scan(void)
103 if (timeout > 10000){ 103 if (timeout > 10000){
104 break; 104 break;
105 } 105 }
106 } 106 }
107 uart_data[i] = SERIAL_UART_DATA; 107 uart_data[i] = SERIAL_UART_DATA;
108 } 108 }
109 109
@@ -125,7 +125,7 @@ uint8_t matrix_scan(void)
125inline 125inline
126bool matrix_is_on(uint8_t row, uint8_t col) 126bool matrix_is_on(uint8_t row, uint8_t col)
127{ 127{
128 return (matrix[row] & ((matrix_row_t)1<col)); 128 return (matrix[row] & ((matrix_row_t)1<<col));
129} 129}
130 130
131inline 131inline
diff --git a/keyboards/redox_w/matrix.c b/keyboards/redox_w/matrix.c
index 5e61103f2..31233af10 100644
--- a/keyboards/redox_w/matrix.c
+++ b/keyboards/redox_w/matrix.c
@@ -1,15 +1,15 @@
1/* Copyright 2017 Mattia Dal Ben 1/* Copyright 2017 Mattia Dal Ben
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 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 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 5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version. 6 * (at your option) any later version.
7 * 7 *
8 * This program is distributed in the hope that it will be useful, 8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 * 12 *
13 * You should have received a copy of the GNU General Public License 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/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
@@ -132,7 +132,7 @@ uint8_t matrix_scan(void)
132inline 132inline
133bool matrix_is_on(uint8_t row, uint8_t col) 133bool matrix_is_on(uint8_t row, uint8_t col)
134{ 134{
135 return (matrix[row] & ((matrix_row_t)1<col)); 135 return (matrix[row] & ((matrix_row_t)1<<col));
136} 136}
137 137
138inline 138inline
diff --git a/keyboards/sx60/matrix.c b/keyboards/sx60/matrix.c
index e91b4f441..634a98a12 100644
--- a/keyboards/sx60/matrix.c
+++ b/keyboards/sx60/matrix.c
@@ -137,7 +137,7 @@ void matrix_init(void) {
137 137
138uint8_t matrix_scan(void) 138uint8_t matrix_scan(void)
139{ 139{
140 if (mcp23018_status) { 140 if (mcp23018_status) {
141 /* if there was an error */ 141 /* if there was an error */
142 if (++mcp23018_reset_loop == 0) { 142 if (++mcp23018_reset_loop == 0) {
143 /* since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans 143 /* since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
@@ -190,7 +190,7 @@ bool matrix_is_modified(void)
190inline 190inline
191bool matrix_is_on(uint8_t row, uint8_t col) 191bool matrix_is_on(uint8_t row, uint8_t col)
192{ 192{
193 return (matrix[row] & ((matrix_row_t)1<col)); 193 return (matrix[row] & ((matrix_row_t)1<<col));
194} 194}
195 195
196inline 196inline
@@ -246,7 +246,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
246 select_row(current_row); 246 select_row(current_row);
247 wait_us(30); 247 wait_us(30);
248 248
249 if (mcp23018_status) { 249 if (mcp23018_status) {
250 /* if there was an error */ 250 /* if there was an error */
251 return 0; 251 return 0;
252 } else { 252 } else {
@@ -279,7 +279,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
279 279
280static void select_row(uint8_t row) 280static void select_row(uint8_t row)
281{ 281{
282 if (mcp23018_status) { 282 if (mcp23018_status) {
283 /* if there was an error do nothing */ 283 /* if there was an error do nothing */
284 } else { 284 } else {
285 /* set active row low : 0 285 /* set active row low : 0
diff --git a/keyboards/telophase/matrix.c b/keyboards/telophase/matrix.c
index b3544453e..c332eba55 100644
--- a/keyboards/telophase/matrix.c
+++ b/keyboards/telophase/matrix.c
@@ -112,7 +112,7 @@ uint8_t matrix_scan(void)
112 if (timeout > 10000){ 112 if (timeout > 10000){
113 break; 113 break;
114 } 114 }
115 } 115 }
116 uart_data[i] = SERIAL_UART_DATA; 116 uart_data[i] = SERIAL_UART_DATA;
117 } 117 }
118 118
@@ -134,7 +134,7 @@ uint8_t matrix_scan(void)
134inline 134inline
135bool matrix_is_on(uint8_t row, uint8_t col) 135bool matrix_is_on(uint8_t row, uint8_t col)
136{ 136{
137 return (matrix[row] & ((matrix_row_t)1<col)); 137 return (matrix[row] & ((matrix_row_t)1<<col));
138} 138}
139 139
140inline 140inline
diff --git a/quantum/matrix.c b/quantum/matrix.c
index 49a184569..d2b805d7f 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -184,7 +184,7 @@ bool matrix_is_modified(void)
184inline 184inline
185bool matrix_is_on(uint8_t row, uint8_t col) 185bool matrix_is_on(uint8_t row, uint8_t col)
186{ 186{
187 return (matrix[row] & ((matrix_row_t)1<col)); 187 return (matrix[row] & ((matrix_row_t)1<<col));
188} 188}
189 189
190inline 190inline