summaryrefslogtreecommitdiff
path: root/keyboard/hbkb/matrix.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-03-05 19:18:01 +0900
committertmk <nobody@nowhere>2013-03-05 21:08:16 +0900
commit9e9a85c1426650148d0d83c900e432003ff174fb (patch)
tree8518cbbb2a1c864a076d1d17758d8584ec367cd2 /keyboard/hbkb/matrix.c
parent38bbe976e00a9a7bf6f8157016717e80503bf6a9 (diff)
Fix ghost block and remove matrix_has_ghost()
Diffstat (limited to 'keyboard/hbkb/matrix.c')
-rw-r--r--keyboard/hbkb/matrix.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/keyboard/hbkb/matrix.c b/keyboard/hbkb/matrix.c
index d7c0663642..f3a0cde5f3 100644
--- a/keyboard/hbkb/matrix.c
+++ b/keyboard/hbkb/matrix.c
@@ -148,18 +148,6 @@ bool matrix_is_modified(void)
}
inline
-bool matrix_has_ghost(void)
-{
-#ifdef MATRIX_HAS_GHOST
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- if (matrix_has_ghost_in_row(i))
- return true;
- }
-#endif
- return false;
-}
-
-inline
bool matrix_is_on(uint8_t row, uint8_t col)
{
return (matrix[row] & (1<<col));
@@ -217,7 +205,8 @@ static bool matrix_has_ghost_in_row(uint8_t row)
// ghost exists in case same state as other row
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
- if (i != row && (matrix[i] & matrix[row]) == matrix[row])
+ //if (i != row && (matrix[i] & matrix[row]) == matrix[row])
+ if (i != row && (matrix[i] & matrix[row]))
return true;
}
return false;