diff options
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/matrix.c | 6 | ||||
| -rw-r--r-- | quantum/quantum.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/quantum/matrix.c b/quantum/matrix.c index d5fd7def8..412662a79 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c | |||
| @@ -68,8 +68,10 @@ uint8_t matrix_cols(void) { | |||
| 68 | 68 | ||
| 69 | void matrix_init(void) { | 69 | void matrix_init(void) { |
| 70 | /* frees PORTF by setting the JTD bit twice within four cycles */ | 70 | /* frees PORTF by setting the JTD bit twice within four cycles */ |
| 71 | MCUCR |= _BV(JTD); | 71 | #ifdef __AVR_ATmega32U4__ |
| 72 | MCUCR |= _BV(JTD); | 72 | MCUCR |= _BV(JTD); |
| 73 | MCUCR |= _BV(JTD); | ||
| 74 | #endif | ||
| 73 | /* initializes the I/O pins */ | 75 | /* initializes the I/O pins */ |
| 74 | #if DIODE_DIRECTION == COL2ROW | 76 | #if DIODE_DIRECTION == COL2ROW |
| 75 | for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { | 77 | for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { |
diff --git a/quantum/quantum.h b/quantum/quantum.h index 69a0d8126..71533f48b 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include "eeconfig.h" | 23 | #include "eeconfig.h" |
| 24 | #include <stddef.h> | 24 | #include <stddef.h> |
| 25 | #include <avr/io.h> | 25 | #include <avr/io.h> |
| 26 | #include <util/delay.h> | ||
| 26 | 27 | ||
| 27 | extern uint32_t default_layer_state; | 28 | extern uint32_t default_layer_state; |
| 28 | 29 | ||
