1
0
Fork 0

Fix ghost block and remove matrix_has_ghost()

This commit is contained in:
tmk 2013-03-05 19:18:01 +09:00
parent 38bbe976e0
commit 9e9a85c142
4 changed files with 27 additions and 16 deletions

View file

@ -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

View file

@ -147,18 +147,6 @@ bool matrix_is_modified(void)
return false;
}
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)
{
@ -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;