X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=sidebyside;f=keyboard%2Fhhkb%2Fmatrix.c;h=08721fc505943d331406015d27fb81c51fe01549;hb=ab083c7ecff4f8a576d858745ab353f7937a1b94;hp=fb96997944ced5293c6e65fb6c5e874290ef108f;hpb=d9fee5571d7de08e76dff5ce75816faf522240f6;p=max%2Ftmk_keyboard.git diff --git a/keyboard/hhkb/matrix.c b/keyboard/hhkb/matrix.c index fb969979..08721fc5 100644 --- a/keyboard/hhkb/matrix.c +++ b/keyboard/hhkb/matrix.c @@ -43,18 +43,6 @@ static matrix_row_t _matrix0[MATRIX_ROWS]; static matrix_row_t _matrix1[MATRIX_ROWS]; -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - void matrix_init(void) { #ifdef DEBUG @@ -132,7 +120,13 @@ uint8_t matrix_scan(void) // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. // This takes 25us or more to make sure KEY_STATE returns to idle state. +#ifdef HHKB_JP + // Looks like JP needs faster scan due to its twice larger matrix + // or it can drop keys in fast key typing + _delay_us(30); +#else _delay_us(75); +#endif } if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32(); } @@ -147,41 +141,12 @@ uint8_t matrix_scan(void) return 1; } -bool matrix_is_modified(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - if (matrix[i] != matrix_prev[i]) - return true; - } - return false; -} - -inline -bool matrix_has_ghost(void) -{ - return false; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & (1<