X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=keyboard%2Fhhkb%2Fmatrix.c;h=f53e36dbe0acd4d23e83de136408681f0f314a20;hb=1385058fc21f80347c7afd2b818e38795ce9d55a;hp=01473d1ec79e1c908237061ad758453075071a3b;hpb=bc5ee91d14547124fd138c09b0c3623e4eefe757;p=max%2Ftmk_keyboard.git
diff --git a/keyboard/hhkb/matrix.c b/keyboard/hhkb/matrix.c
index 01473d1e..f53e36db 100644
--- a/keyboard/hhkb/matrix.c
+++ b/keyboard/hhkb/matrix.c
@@ -23,6 +23,7 @@ along with this program. If not, see .
#include
#include
#include
+#include "print.h"
#include "debug.h"
#include "util.h"
#include "timer.h"
@@ -135,6 +136,12 @@ uint8_t matrix_cols(void)
void matrix_init(void)
{
+#ifdef DEBUG
+ print_enable = true;
+ debug_enable = true;
+ debug_keyboard = true;
+#endif
+
KEY_INIT();
// initialize matrix state: all keys off
@@ -228,24 +235,21 @@ uint16_t matrix_get_row(uint8_t row)
return matrix[row];
}
-void matrix_debug(void)
+void matrix_print(void)
{
- if (!debug_matrix)
- return;
-
#if (MATRIX_COLS <= 8)
- debug("\nr/c 01234567\n");
+ print("\nr/c 01234567\n");
#else
- debug("\nr/c 0123456789ABCDEF\n");
+ print("\nr/c 0123456789ABCDEF\n");
#endif
for (uint8_t row = 0; row < matrix_rows(); row++) {
- debug_hex(row); debug(": ");
+ phex(row); print(": ");
#if (MATRIX_COLS <= 8)
- debug_bin_reverse(matrix_get_row(row));
+ pbin_reverse(matrix_get_row(row));
#else
- debug_bin_reverse16(matrix_get_row(row));
+ pbin_reverse16(matrix_get_row(row));
#endif
- debug("\n");
+ print("\n");
}
}