From 2b677ddac9aaba14f75787ab4b6d81054ad6ffd4 Mon Sep 17 00:00:00 2001 From: Danny Date: Mon, 28 May 2018 18:02:41 -0400 Subject: Fix nyquist (and other splits using D2 in debouncing) (#3067) * Update default Nyquist revision * LED slave fix * Sync changes from lets_split * Add needed check for debouncing * Remove line that was setting PD2 pin and interfering with use of that pin * Add backlight key to keymap --- keyboards/nyquist/matrix.c | 48 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) (limited to 'keyboards/nyquist/matrix.c') diff --git a/keyboards/nyquist/matrix.c b/keyboards/nyquist/matrix.c index 5fbae1150..3cdad4adb 100644 --- a/keyboards/nyquist/matrix.c +++ b/keyboards/nyquist/matrix.c @@ -1,5 +1,5 @@ /* -Copyright 2017 Danny Nguyen +Copyright 2017 Danny Nguyen This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,6 +31,11 @@ along with this program. If not, see . #include "config.h" #include "timer.h" +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" + extern backlight_config_t backlight_config; +#endif + #ifdef USE_I2C # include "i2c.h" #else // USE_SERIAL @@ -58,6 +63,8 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS]; #define ERROR_DISCONNECT_COUNT 5 +#define SERIAL_LED_ADDR 0x00 + #define ROWS_PER_HAND (MATRIX_ROWS/2) static uint8_t error_count = 0; @@ -115,12 +122,23 @@ uint8_t matrix_cols(void) void matrix_init(void) { +#ifdef DISABLE_JTAG + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1< 0) if (debouncing) return false; +#endif return true; } -- cgit v1.2.3