summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--quantum/matrix.c6
-rw-r--r--tmk_core/common/keyboard.c7
2 files changed, 6 insertions, 7 deletions
diff --git a/quantum/matrix.c b/quantum/matrix.c
index 5337e2626b..3600d4e7b5 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -148,12 +148,6 @@ uint8_t matrix_cols(void) {
void matrix_init(void) {
- // To use PORTF disable JTAG with writing JTD bit twice within four cycles.
- #if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega32U4__))
- MCUCR |= _BV(JTD);
- MCUCR |= _BV(JTD);
- #endif
-
// initialize row and col
#if (DIODE_DIRECTION == COL2ROW)
unselect_rows();
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index 4eff764e2d..d3fbe2d879 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -148,6 +148,11 @@ bool is_keyboard_master(void) {
*/
void keyboard_init(void) {
timer_init();
+// To use PORTF disable JTAG with writing JTD bit twice within four cycles.
+#if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega32U4__))
+ MCUCR |= _BV(JTD);
+ MCUCR |= _BV(JTD);
+#endif
matrix_init();
#ifdef PS2_MOUSE_ENABLE
ps2_mouse_init();
@@ -185,7 +190,7 @@ void keyboard_init(void) {
/** \brief Keyboard task: Do keyboard routine jobs
*
- * Do routine keyboard jobs:
+ * Do routine keyboard jobs:
*
* * scan matrix
* * handle mouse movements