X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=hhkb%2Fmatrix.c;h=d95ee11350389d217b9b6be9d4ab10393ca5b9b5;hb=2f80e790c6310ad24a4cb3d4a72c31314364fef7;hp=d8dc9a7f8c35389924c15552286547b9ac7bafff;hpb=461e0d3d8c82cc78d29d3115af3c417bb51bb50f;p=max%2Ftmk_keyboard.git diff --git a/hhkb/matrix.c b/hhkb/matrix.c index d8dc9a7f..d95ee113 100644 --- a/hhkb/matrix.c +++ b/hhkb/matrix.c @@ -1,10 +1,13 @@ /* * scan matrix */ +#include +#include #include #include #include "matrix.h" #include "print.h" +#include "util.h" // matrix is active low. (key on: 0/key off: 1) // @@ -30,10 +33,6 @@ static uint8_t _matrix0[MATRIX_ROWS]; static uint8_t _matrix1[MATRIX_ROWS]; -static bool matrix_has_ghost_in_row(int row); -static int bit_pop(uint8_t bits); - - inline int matrix_rows(void) { @@ -122,9 +121,6 @@ void matrix_print(void) for (int row = 0; row < matrix_rows(); row++) { phex(row); print(": "); pbin_reverse(matrix_get_row(row)); - if (matrix_has_ghost_in_row(row)) { - print("