summaryrefslogtreecommitdiff
path: root/keyboard
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-03-05 21:46:35 +0900
committertmk <nobody@nowhere>2013-03-05 21:46:35 +0900
commit5d6b848a157a2e94859949961297d40da6a77527 (patch)
tree685ba0477174789f5d64902a5cd96114346aa9d7 /keyboard
parent38bbe976e00a9a7bf6f8157016717e80503bf6a9 (diff)
parent81d2753ab07890532ea8c4bd6a68de3e5e08ca33 (diff)
Merge branch 'ghost_fix'
Diffstat (limited to 'keyboard')
-rw-r--r--keyboard/hbkb/Makefile.lufa1
-rw-r--r--keyboard/hbkb/matrix.c27
2 files changed, 2 insertions, 26 deletions
diff --git a/keyboard/hbkb/Makefile.lufa b/keyboard/hbkb/Makefile.lufa
index c73a0ca7d1..33366d7208 100644
--- a/keyboard/hbkb/Makefile.lufa
+++ b/keyboard/hbkb/Makefile.lufa
@@ -99,6 +99,7 @@ F_USB = $(F_CPU)
#
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
#NKRO_ENABLE = yes # USB Nkey Rollover
#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support
diff --git a/keyboard/hbkb/matrix.c b/keyboard/hbkb/matrix.c
index d7c0663642..a24d24b8c3 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));
@@ -194,19 +182,6 @@ void matrix_print(void)
}
}
-uint8_t matrix_key_count(void)
-{
- uint8_t count = 0;
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
-#if (MATRIX_COLS <= 8)
- count += bitpop(matrix[i]);
-#else
- count += bitpop16(matrix[i]);
-#endif
- }
- return count;
-}
-
#ifdef MATRIX_HAS_GHOST
inline
static bool matrix_has_ghost_in_row(uint8_t row)
@@ -217,7 +192,7 @@ 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]))
return true;
}
return false;