aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/common/keyboard.c
diff options
context:
space:
mode:
authorJeremiah <barrar@users.noreply.github.com>2017-05-14 09:36:50 -0700
committerJeremiah <barrar@users.noreply.github.com>2017-05-14 09:36:50 -0700
commit84395e8a0427bcb51c4ef4ff24c7901d1fbb0764 (patch)
tree9b9e3a36296fce47f80e6d54571d9ecadcdba96a /tmk_core/common/keyboard.c
parentb9b2244b8275066d1226fba0fb75747a194f0553 (diff)
downloadqmk_firmware-84395e8a0427bcb51c4ef4ff24c7901d1fbb0764.tar.gz
qmk_firmware-84395e8a0427bcb51c4ef4ff24c7901d1fbb0764.zip
whoops
Diffstat (limited to 'tmk_core/common/keyboard.c')
-rw-r--r--tmk_core/common/keyboard.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 20b867285..a3fe559f3 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -67,7 +67,7 @@ extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
67static matrix_row_t get_real_keys(uint8_t row, matrix_row_t rowdata){ 67static matrix_row_t get_real_keys(uint8_t row, matrix_row_t rowdata){
68 matrix_row_t out = 0; 68 matrix_row_t out = 0;
69 for (int col = 0; col < MATRIX_COLS; col++) { 69 for (int col = 0; col < MATRIX_COLS; col++) {
70 if (pgm_read_byte(&keymaps[0][row][col]) && ((rowdata & (1<<col)))){ 70 if (pgm_read_byte(&keymaps[0][row][col]) && (rowdata & (1<<col))){
71 out |= 1<<col; 71 out |= 1<<col;
72 } 72 }
73 } 73 }
@@ -83,7 +83,7 @@ static inline bool countones(matrix_row_t row)
83static inline bool has_ghost_in_row(uint8_t row, matrix_row_t rowdata) 83static inline bool has_ghost_in_row(uint8_t row, matrix_row_t rowdata)
84{ 84{
85 rowdata = get_real_keys(row, rowdata); 85 rowdata = get_real_keys(row, rowdata);
86 if (((rowdata - 1) & rowdata) == 0){ 86 if ((countones(rowdata)) == 0){
87 return false; 87 return false;
88 } 88 }
89 /* No ghost exists when less than 2 keys are down on the row. 89 /* No ghost exists when less than 2 keys are down on the row.