diff options
Diffstat (limited to 'keyboards/sx60/matrix.c')
| -rw-r--r-- | keyboards/sx60/matrix.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 | ||
| 138 | uint8_t matrix_scan(void) | 138 | uint8_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) | |||
| 190 | inline | 190 | inline |
| 191 | bool matrix_is_on(uint8_t row, uint8_t col) | 191 | bool 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 | ||
| 196 | inline | 196 | inline |
| @@ -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 | ||
| 280 | static void select_row(uint8_t row) | 280 | static 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 |
