summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2012-10-17 14:23:31 +0900
committertmk <nobody@nowhere>2012-10-17 15:55:37 +0900
commitbc5ee91d14547124fd138c09b0c3623e4eefe757 (patch)
treea0bca2effdb4c6e8eb2fdceb624378ae96dca5f0
parent30eb3e3520e9d4d7b9a9dbac0c5c0200485103c2 (diff)
HHKB scan matrix: fix wait time on power on
-rw-r--r--keyboard/hhkb/matrix.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/keyboard/hhkb/matrix.c b/keyboard/hhkb/matrix.c
index 3bd6e73b35..01473d1ec7 100644
--- a/keyboard/hhkb/matrix.c
+++ b/keyboard/hhkb/matrix.c
@@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
-#include "print.h"
+#include "debug.h"
#include "util.h"
#include "timer.h"
#include "matrix.h"
@@ -107,7 +107,7 @@ static matrix_row_t _matrix1[MATRIX_ROWS];
#define KEY_POWER_ON() do { \
KEY_INIT(); \
PORTB &= ~(1<<5); \
- _delay_us(200); \
+ _delay_ms(1); \
} while (0)
#define KEY_POWER_OFF() do { \
DDRB &= ~0x3F; \
@@ -228,21 +228,24 @@ uint16_t matrix_get_row(uint8_t row)
return matrix[row];
}
-void matrix_print(void)
+void matrix_debug(void)
{
+ if (!debug_matrix)
+ return;
+
#if (MATRIX_COLS <= 8)
- print("\nr/c 01234567\n");
+ debug("\nr/c 01234567\n");
#else
- print("\nr/c 0123456789ABCDEF\n");
+ debug("\nr/c 0123456789ABCDEF\n");
#endif
for (uint8_t row = 0; row < matrix_rows(); row++) {
- phex(row); print(": ");
+ debug_hex(row); debug(": ");
#if (MATRIX_COLS <= 8)
- pbin_reverse(matrix_get_row(row));
+ debug_bin_reverse(matrix_get_row(row));
#else
- pbin_reverse16(matrix_get_row(row));
+ debug_bin_reverse16(matrix_get_row(row));
#endif
- print("\n");
+ debug("\n");
}
}